3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 00:55:32 +00:00

Merge remote-tracking branch 'origin/master' into eddie/abc9_scratchpad

This commit is contained in:
Eddie Hung 2020-01-11 17:02:20 -08:00
commit c063436eea
5 changed files with 117 additions and 85 deletions

View file

@ -0,0 +1,25 @@
read_verilog <<EOT
module register_file(
input wire clk,
input wire write_enable,
input wire [63:0] write_data,
input wire [4:0] write_reg,
input wire [4:0] read1_reg,
output reg [63:0] read1_data,
);
reg [63:0] registers[0:31];
always @(posedge clk) begin
if (write_enable == 1'b1) begin
registers[write_reg] <= write_data;
end
end
always @(all) begin
read1_data <= registers[read1_reg];
end
endmodule
EOT
synth_ecp5 -abc9