projects
/
yosys.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add proc_rom pass.
[yosys.git]
/
tests
/
proc
/
proc_rom.ys
1
read_verilog << EOT
2
3
module top(input [3:0] a, input en, output [7:0] d);
4
5
always @*
6
if (en)
7
case(a)
8
4'h0: d <= 8'h12;
9
4'h1: d <= 8'h34;
10
4'h2: d <= 8'h56;
11
4'h3: d <= 8'h78;
12
4'h4: d <= 8'h9a;
13
4'h5: d <= 8'hbc;
14
4'h6: d <= 8'hde;
15
4'h7: d <= 8'hff;
16
4'h8: d <= 8'h61;
17
4'h9: d <= 8'h49;
18
4'ha: d <= 8'h36;
19
4'hb: d <= 8'h81;
20
4'hc: d <= 8'h8c;
21
4'hd: d <= 8'ha9;
22
4'he: d <= 8'h99;
23
4'hf: d <= 8'h51;
24
endcase
25
else
26
d <= 0;
27
28
endmodule
29
30
EOT
31
32
hierarchy -auto-top
33
34
design -save orig
35
proc
36
memory
37
opt_dff
38
design -stash postopt
39
design -load orig
40
proc -norom
41
design -stash preopt
42
43
equiv_opt -assert -run prepare: dummy