PATCH: verilog hex memory dump backend for BFD

Anthony Green green@moxielogic.com
Mon Apr 27 12:41:00 GMT 2009


Ping.  Thanks!

AG



green@moxielogic.com wrote:
> The following patch adds a new output-only format to BFD called
> "verilog hex memory dump format".
>
> When developing a new microprocessor in verilog it is important to
> develop testbenches using simulated memory containing real programs.
> In order to help populate this memory, verilog provides the 
> $readmemh() function to load an array of verilog registers (memory) 
> with the contents of a file.  The file must be in the verilog hex 
> memory dump format as defined by the IEEE verilog standard.
>
> Adding support for this format directly into BFD greatly simplifies
> the workflow:
>
> $ moxie-elf-gcc -o hello.x hello.c
> $ moxie-elf-objcopy -O verilog hello.x hello.vh
>
> Now hello.vh can be used to populate memory modules directly in
> verilog like so:
>
> module memory();
>   reg [7:0] my_memory [0:64000];
>   initial begin
>     $readmemh("hello.vh", my_memory);
>   end
> endmodule;
>
> This new feature was tested with a Free Software verilog
> implementation called Icarus Verilog.
>
> Ok?
>
>
> 2009-04-22  Anthony Green  <green@moxielogic.com>
>
>         * verilog.c: New file.
>         * Makefile.am (BFD32_LIBS): Add verilog.c.
>         (BFD32_LIBS_CFILES): Add verilog.c.
>         (verilog.lo): New build rule.
>         * Makefile.in: Rebuilt.
>         * targets.c: Add verilog support.
>         * bfd-in2.h: Add verilog support.
>
>   



More information about the Binutils mailing list