mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-22 02:57:51 +00:00
Progress on AppNote 011
This commit is contained in:
parent
1b3a60976d
commit
e23a0072ec
6 changed files with 190 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
|||
example_00.dot
|
||||
example_01.dot
|
||||
example_02.dot
|
||||
example_03.dot
|
||||
cmos_00.dot
|
||||
cmos_01.dot
|
||||
splice.dot
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module example(input clk, a, b, c, output reg [1:0] y);
|
||||
always @(posedge clk)
|
||||
if (c)
|
||||
y <= c ? a + b : 2'd0;
|
||||
module example(input clk, a, b, c,
|
||||
output reg [1:0] y);
|
||||
always @(posedge clk)
|
||||
if (c)
|
||||
y <= c ? a + b : 2'd0;
|
||||
endmodule
|
||||
|
|
|
@ -4,3 +4,8 @@ proc
|
|||
show -format dot -prefix example_01
|
||||
opt
|
||||
show -format dot -prefix example_02
|
||||
|
||||
cd example
|
||||
select t:$add
|
||||
show -format dot -prefix example_03
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ sed -i '/^label=/ d;' example_*.dot splice.dot cmos_*.dot
|
|||
dot -Tpdf -o example_00.pdf example_00.dot
|
||||
dot -Tpdf -o example_01.pdf example_01.dot
|
||||
dot -Tpdf -o example_02.pdf example_02.dot
|
||||
dot -Tpdf -o example_03.pdf example_03.dot
|
||||
dot -Tpdf -o splice.pdf splice.dot
|
||||
dot -Tpdf -o cmos_00.pdf cmos_00.dot
|
||||
dot -Tpdf -o cmos_01.pdf cmos_01.dot
|
||||
|
|
|
@ -4,6 +4,7 @@ input [1:0] a, b, c, d, e, f;
|
|||
output [1:0] x = {a[0], a[1]};
|
||||
|
||||
output [11:0] y;
|
||||
assign {y[11:4], y[1:0], y[3:2]} = {a, b, -{c, d}, ~{e, f}};
|
||||
assign {y[11:4], y[1:0], y[3:2]} =
|
||||
{a, b, -{c, d}, ~{e, f}};
|
||||
|
||||
endmodule
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue