mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-09 23:52:03 +00:00
libparse: fix quoting and negedge in filterlib -verilogsim
This commit is contained in:
parent
504b668ea6
commit
90553267b0
4 changed files with 39 additions and 31 deletions
|
|
@ -1,13 +1,13 @@
|
|||
module dff1 (D, CLK, Q);
|
||||
reg "IQ", "IQN";
|
||||
reg IQ, IQN;
|
||||
input D;
|
||||
input CLK;
|
||||
output Q;
|
||||
assign Q = IQ; // IQ
|
||||
always @(posedge CLK) begin
|
||||
// !D
|
||||
"IQ" <= (~D);
|
||||
"IQN" <= ~((~D));
|
||||
IQ <= (~D);
|
||||
IQN <= ~((~D));
|
||||
end
|
||||
endmodule
|
||||
module dff2 (D, CLK, Q);
|
||||
|
|
@ -23,7 +23,7 @@ module dff2 (D, CLK, Q);
|
|||
end
|
||||
endmodule
|
||||
module dffe (D, EN, CLK, Q, QN);
|
||||
reg "IQ", "IQN";
|
||||
reg IQ, IQN;
|
||||
input D;
|
||||
input EN;
|
||||
input CLK;
|
||||
|
|
@ -31,9 +31,9 @@ module dffe (D, EN, CLK, Q, QN);
|
|||
assign Q = IQ; // "IQ"
|
||||
output QN;
|
||||
assign QN = IQN; // "IQN"
|
||||
always @(posedge (~CLK)) begin
|
||||
always @(negedge CLK) begin
|
||||
// ( D & EN ) | ( IQ & ! EN )
|
||||
"IQ" <= ((D&EN)|(IQ&(~EN)));
|
||||
"IQN" <= ~(((D&EN)|(IQ&(~EN))));
|
||||
IQ <= ((D&EN)|(IQ&(~EN)));
|
||||
IQN <= ~(((D&EN)|(IQ&(~EN))));
|
||||
end
|
||||
endmodule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue