Skip to content

Commit

Permalink
add std_cat
Browse files Browse the repository at this point in the history
  • Loading branch information
EclecticGriffin committed Jun 18, 2024
1 parent 16e1835 commit a46cad8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions interp/src/primitives/combinational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,3 +568,8 @@ comb_primitive!(StdUnsynSmod[WIDTH](left: WIDTH, right: WIDTH) -> (out: WIDTH) {
&left.as_signed(),
&right.as_signed()), WIDTH))
});

comb_primitive!(StdCat[LEFT_WIDTH, RIGHT_WIDTH, OUT_WIDTH](left: LEFT_WIDTH, right: RIGHT_WIDTH) -> (out: OUT_WIDTH) {

Ok(Value::concat(left, right))
});
2 changes: 2 additions & 0 deletions interp/src/structures/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,8 @@ impl InterpreterState {
Box::new(combinational::StdUnsynSmod::new(params, cell_qin))
}

"std_cat" => Box::new(combinational::StdCat::new(params, cell_qin)),

p => {
return Err(
InterpreterError::UnknownPrimitive(p.to_string()).into()
Expand Down

0 comments on commit a46cad8

Please sign in to comment.