diff --git a/interp/src/primitives/combinational.rs b/interp/src/primitives/combinational.rs index ecc907d88d..c67f1438e5 100644 --- a/interp/src/primitives/combinational.rs +++ b/interp/src/primitives/combinational.rs @@ -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)) +}); diff --git a/interp/src/structures/environment.rs b/interp/src/structures/environment.rs index 51e51f2c24..27e1c40714 100644 --- a/interp/src/structures/environment.rs +++ b/interp/src/structures/environment.rs @@ -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()