mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-08 23:35:08 +00:00
libparse: fix up tests since liberty expression parsing now normalizes the form of these expressions
This commit is contained in:
parent
bf29f6dc11
commit
b0a3d6a3e7
8 changed files with 176 additions and 17 deletions
39
tests/liberty/unquoted.lib.verilogsim.ok
Normal file
39
tests/liberty/unquoted.lib.verilogsim.ok
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
module dff1 (D, CLK, Q);
|
||||
reg "IQ", "IQN";
|
||||
input D;
|
||||
input CLK;
|
||||
output Q;
|
||||
assign Q = IQ; // IQ
|
||||
always @(posedge CLK) begin
|
||||
// !D
|
||||
"IQ" <= (~D);
|
||||
"IQN" <= ~((~D));
|
||||
end
|
||||
endmodule
|
||||
module dff2 (D, CLK, Q);
|
||||
reg IQ, IQN;
|
||||
input D;
|
||||
input CLK;
|
||||
output Q;
|
||||
assign Q = IQ; // "IQ"
|
||||
always @(posedge CLK) begin
|
||||
// D '
|
||||
IQ <= (~D);
|
||||
IQN <= ~((~D));
|
||||
end
|
||||
endmodule
|
||||
module dffe (D, EN, CLK, Q, QN);
|
||||
reg "IQ", "IQN";
|
||||
input D;
|
||||
input EN;
|
||||
input CLK;
|
||||
output Q;
|
||||
assign Q = IQ; // "IQ"
|
||||
output QN;
|
||||
assign QN = IQN; // "IQN"
|
||||
always @(posedge (~CLK)) begin
|
||||
// ( 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