add bufif0

This commit is contained in:
Akihiko Odaki 2025-09-01 20:06:47 +09:00
parent 80a2f0cf68
commit a5f80e990f
3 changed files with 6 additions and 1 deletions

View File

@ -114,6 +114,7 @@ instance Show AlwaysKW where
data NInputGateKW
= GateAnd
| GateBufif0
| GateNand
| GateOr
| GateNor
@ -123,6 +124,7 @@ data NInputGateKW
instance Show NInputGateKW where
show GateAnd = "and"
show GateBufif0 = "bufif0"
show GateNand = "nand"
show GateOr = "or"
show GateNor = "nor"

View File

@ -873,6 +873,7 @@ OptGateName :: { (Identifier, [Range]) }
NInputGateKW :: { NInputGateKW }
: "and" { GateAnd }
| "bufif0" { GateBufif0 }
| "nand" { GateNand }
| "or" { GateOr }
| "nor" { GateNor }

View File

@ -6,11 +6,13 @@ module top;
wire output_and_delay;
wire output_not;
wire output_buf_delay;
wire output_bufif0_delay;
and (output_and, input_a, input_b);
and #1 (output_and_delay, input_a, input_b);
not (output_not, input_a);
buf #2 foo_name (output_buf_delay, input_a);
bufif0 (output_bufif0_delay, input_a, input_b);
wire output_nand, output_or, output_nor, output_xor, output_xnor;
nand (output_nand, input_a, input_b);
@ -23,7 +25,7 @@ module top;
$monitor("%3d ", $time,
input_a, input_b,
output_and, output_and_delay,
output_not, output_buf_delay,
output_not, output_buf_delay, output_bufif0_delay,
output_nand, output_or, output_nor, output_xor, output_xnor);
#1;