make examples parse with new parser

main
NotAFile 2022-02-02 01:13:33 +01:00
parent 1798baa9d3
commit b428a6d340
4 changed files with 13 additions and 16 deletions

View File

@ -1,8 +1,8 @@
module clockdiv_2 ( module clockdiv_2 (
input wire clk, clk: Logic,
input wire rst, rst: Logic
output wire out_clk ) -> Logic
) { {
proc (clk) { proc (clk) {
match (~rst) { match (~rst) {
0 => out_clk = 0, 0 => out_clk = 0,

View File

@ -1,7 +1,7 @@
module comparator ( module comparator (
input wire [8] a, a: Logic<8>,
input wire [8] b, b: Logic<8>
output wire eq ) -> Logic
) { {
assign eq = ~reduce_or(a ^ b); assign eq = ~reduce_or(a ^ b);
} }

View File

@ -1,9 +1,7 @@
module halfadd ( module halfadd (
input wire a, a: Logic,
input wire b, b: Logic
output wire sum, ) -> (Logic, Logic)
output wire carry
)
{ {
assign sum = a ^ b; assign sum = a ^ b;
assign carry = a & b; assign carry = a & b;

View File

@ -1,7 +1,6 @@
module identity ( module identity (
input wire a, a: Logic
output wire x ) -> Logic
)
{ {
assign x = a; assign x = a;
} }