mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-30 06:50:09 +00:00
Add tests for Xilinx UG901 examples
This commit is contained in:
parent
0d037bf9d8
commit
2ae7dec530
89 changed files with 2962 additions and 0 deletions
24
tests/xilinx_ug901/rams_init_file.v
Normal file
24
tests/xilinx_ug901/rams_init_file.v
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Initializing Block RAM from external data file
|
||||
// Binary data
|
||||
// File: rams_init_file.v
|
||||
|
||||
module rams_init_file (clk, we, addr, din, dout);
|
||||
input clk;
|
||||
input we;
|
||||
input [5:0] addr;
|
||||
input [31:0] din;
|
||||
output [31:0] dout;
|
||||
|
||||
reg [31:0] ram [0:63];
|
||||
reg [31:0] dout;
|
||||
|
||||
initial begin
|
||||
$readmemb("rams_init_file.data",ram);
|
||||
end
|
||||
|
||||
always @(posedge clk)
|
||||
begin
|
||||
if (we)
|
||||
ram[addr] <= din;
|
||||
dout <= ram[addr];
|
||||
end endmodule
|
Loading…
Add table
Add a link
Reference in a new issue