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 (
input wire clk,
input wire rst,
output wire out_clk
) {
clk: Logic,
rst: Logic
) -> Logic
{
proc (clk) {
match (~rst) {
0 => out_clk = 0,

View File

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

View File

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

View File

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