```rust
use ruverta::{Module, Sens, Stmt};
fn test_module() {
let m = Module::new("test_module")
.param("BIT", Some("8"))
.input("clk", 1)
.input("rstn", 1)
.input("in0", 8)
.input("in1", 8)
.output("out", 8)
.always_comb(Stmt::assign("out", "in0 + in1"))
.always_ff(
Sens::new().posedge("clk"),
Stmt::begin().add(Stmt::assign("a", "b")).end(),
);
println!("{}", m.verilog().join("\n"));
}
```
|
```systemverilog
module test_module #(
parameter BIT = 8
) (
input logic clk,
input logic rstn,
input logic [ 7:0] in0,
input logic [ 7:0] in1,
output logic [ 7:0] out
);
always_comb
out = in0 + in1;
always_ff @(posedge clk)
begin
a <= b;
end
endmodule;
```
|