Compare commits

...

3 Commits

Author SHA1 Message Date
Akihiko Odaki 50bb52f70a
Merge 4afd4f64b9 into c1ce7d067b 2025-11-01 22:13:35 -04:00
Akihiko Odaki 4afd4f64b9 add rpmos 2025-09-01 20:55:15 +09:00
Akihiko Odaki a5f80e990f add bufif0 2025-09-01 20:50:45 +09:00
3 changed files with 11 additions and 1 deletions

View File

@ -114,18 +114,22 @@ instance Show AlwaysKW where
data NInputGateKW
= GateAnd
| GateBufif0
| GateNand
| GateOr
| GateNor
| GateRpmos
| GateXor
| GateXnor
deriving Eq
instance Show NInputGateKW where
show GateAnd = "and"
show GateBufif0 = "bufif0"
show GateNand = "nand"
show GateOr = "or"
show GateNor = "nor"
show GateRpmos = "rpmos"
show GateXor = "xor"
show GateXnor = "xnor"

View File

@ -873,9 +873,11 @@ OptGateName :: { (Identifier, [Range]) }
NInputGateKW :: { NInputGateKW }
: "and" { GateAnd }
| "bufif0" { GateBufif0 }
| "nand" { GateNand }
| "or" { GateOr }
| "nor" { GateNor }
| "rpmos" { GateRpmos }
| "xor" { GateXor }
| "xnor" { GateXnor }
NOutputGateKW :: { NOutputGateKW }

View File

@ -6,11 +6,15 @@ module top;
wire output_and_delay;
wire output_not;
wire output_buf_delay;
wire output_bufif0_delay;
wire output_rpmos;
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);
rpmos (output_rpmos, input_a, input_b);
wire output_nand, output_or, output_nor, output_xor, output_xnor;
nand (output_nand, input_a, input_b);
@ -23,7 +27,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;