mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-08 04:01:25 +00:00
Progress in presentation
This commit is contained in:
parent
42ce3db983
commit
f08c71b96c
5 changed files with 79 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
all: select_01.pdf red_or3x1.pdf sym_mul.pdf
|
||||
all: select_01.pdf red_or3x1.pdf sym_mul.pdf mymul.pdf
|
||||
|
||||
select_01.pdf: select_01.v select_01.ys
|
||||
../../yosys select_01.ys
|
||||
|
@ -10,3 +10,6 @@ red_or3x1.pdf: red_or3x1_*
|
|||
sym_mul.pdf: sym_mul_*
|
||||
../../yosys sym_mul_test.ys
|
||||
|
||||
mymul.pdf: mymul_*
|
||||
../../yosys mymul_test.ys
|
||||
|
||||
|
|
15
manual/PRESENTATION_ExAdv/mymul_map.v
Normal file
15
manual/PRESENTATION_ExAdv/mymul_map.v
Normal file
|
@ -0,0 +1,15 @@
|
|||
module MYMUL(A, B, Y);
|
||||
parameter WIDTH = 1;
|
||||
input [WIDTH-1:0] A, B;
|
||||
output reg [WIDTH-1:0] Y;
|
||||
|
||||
wire [1023:0] _TECHMAP_DO_ = "proc; clean";
|
||||
|
||||
integer i;
|
||||
always @* begin
|
||||
Y = 0;
|
||||
for (i = 0; i < WIDTH; i=i+1)
|
||||
if (A[i])
|
||||
Y = Y + (B << i);
|
||||
end
|
||||
endmodule
|
4
manual/PRESENTATION_ExAdv/mymul_test.v
Normal file
4
manual/PRESENTATION_ExAdv/mymul_test.v
Normal file
|
@ -0,0 +1,4 @@
|
|||
module test(A, B, Y);
|
||||
input [1:0] A, B;
|
||||
output [1:0] Y = A * B;
|
||||
endmodule
|
15
manual/PRESENTATION_ExAdv/mymul_test.ys
Normal file
15
manual/PRESENTATION_ExAdv/mymul_test.ys
Normal file
|
@ -0,0 +1,15 @@
|
|||
read_verilog mymul_test.v
|
||||
hierarchy -check -top test
|
||||
|
||||
techmap -map sym_mul_map.v \
|
||||
-map mymul_map.v;;
|
||||
|
||||
rename test test_mapped
|
||||
read_verilog mymul_test.v
|
||||
miter -equiv test test_mapped miter
|
||||
flatten miter
|
||||
|
||||
sat -verify -prove trigger 0 miter
|
||||
|
||||
splitnets -ports test_mapped/A
|
||||
show -prefix mymul -format pdf -notitle test_mapped
|
Loading…
Add table
Add a link
Reference in a new issue