mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-12 14:11:00 +00:00
fabulous: improvements to the pass
Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
parent
e3f9ff2679
commit
f111bbdf40
13 changed files with 335 additions and 134 deletions
33
tests/arch/fabulous/regfile.ys
Normal file
33
tests/arch/fabulous/regfile.ys
Normal file
|
@ -0,0 +1,33 @@
|
|||
read_verilog <<EOT
|
||||
module sync_sync(input clk, we, input [4:0] aw, aa, ab, input [3:0] wd, output reg [3:0] ra, rb);
|
||||
reg [3:0] mem[0:31];
|
||||
always @(posedge clk)
|
||||
if (we) mem[aw] <= wd;
|
||||
always @(posedge clk)
|
||||
ra <= mem[aa];
|
||||
always @(posedge clk)
|
||||
rb <= mem[ab];
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
synth_fabulous -top sync_sync
|
||||
cd sync_sync
|
||||
select -assert-count 1 t:RegFile_32x4
|
||||
|
||||
design -reset
|
||||
|
||||
read_verilog <<EOT
|
||||
module async_sync(input clk, we, input [4:0] aw, aa, ab, input [3:0] wd, output reg [3:0] ra, rb);
|
||||
reg [3:0] mem[0:31];
|
||||
always @(posedge clk)
|
||||
if (we) mem[aw] <= wd;
|
||||
always @(posedge clk)
|
||||
ra <= mem[aa];
|
||||
always @(*)
|
||||
rb <= mem[ab];
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
synth_fabulous -top async_sync
|
||||
cd async_sync
|
||||
select -assert-count 1 t:RegFile_32x4
|
Loading…
Add table
Add a link
Reference in a new issue