diff --git a/output.log b/output.log new file mode 100644 index 0000000..d67df49 --- /dev/null +++ b/output.log @@ -0,0 +1,17 @@ +Test passed +Test passed +Left barrel shifter test passed +Warning: file 'v1.hex' for memory 'a_memory' has a gap at addresses 64 to 255. +Warning: file 'v2.hex' for memory 'b_memory' has a gap at addresses 64 to 255. +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 0 +GOT 410 +Test 0 passed +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 1 +GOT 354 +Test 1 passed +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 2 +GOT 524 +Test 2 passed +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 3 +GOT 410 +Test 3 passed diff --git a/output1.log b/output1.log new file mode 100644 index 0000000..386f3d2 --- /dev/null +++ b/output1.log @@ -0,0 +1 @@ +Test passed diff --git a/output2.log b/output2.log new file mode 100644 index 0000000..386f3d2 --- /dev/null +++ b/output2.log @@ -0,0 +1 @@ +Test passed diff --git a/output3.log b/output3.log new file mode 100644 index 0000000..722b854 --- /dev/null +++ b/output3.log @@ -0,0 +1 @@ +Left barrel shifter test passed diff --git a/output4.log b/output4.log new file mode 100644 index 0000000..54d9889 --- /dev/null +++ b/output4.log @@ -0,0 +1,14 @@ +Warning: file 'v1.hex' for memory 'a_memory' has a gap at addresses 64 to 255. +Warning: file 'v2.hex' for memory 'b_memory' has a gap at addresses 64 to 255. +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 0 +GOT 410 +Test 0 passed +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 1 +GOT 354 +Test 1 passed +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 2 +GOT 524 +Test 2 passed +STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index 3 +GOT 410 +Test 3 passed diff --git a/part_1_combinational/AluTest b/part_1_combinational/AluTest new file mode 100755 index 0000000..aba9387 --- /dev/null +++ b/part_1_combinational/AluTest @@ -0,0 +1,12 @@ +#!/bin/sh + +BLUESPECDIR=`echo 'puts $env(BLUESPECDIR)' | bluetcl` + +for arg in $@ +do + if (test "$arg" = "-h") + then + exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTest --script_name `basename $0` -h + fi +done +exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTest --script_name `basename $0` --creation_time 1708621743 "$@" diff --git a/part_1_combinational/AluTest.so b/part_1_combinational/AluTest.so new file mode 100755 index 0000000..4cc78e9 Binary files /dev/null and b/part_1_combinational/AluTest.so differ diff --git a/part_1_combinational/ArbiterTest b/part_1_combinational/ArbiterTest new file mode 100755 index 0000000..43ed8bb --- /dev/null +++ b/part_1_combinational/ArbiterTest @@ -0,0 +1,12 @@ +#!/bin/sh + +BLUESPECDIR=`echo 'puts $env(BLUESPECDIR)' | bluetcl` + +for arg in $@ +do + if (test "$arg" = "-h") + then + exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTest --script_name `basename $0` -h + fi +done +exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTest --script_name `basename $0` --creation_time 1708621745 "$@" diff --git a/part_1_combinational/ArbiterTest.so b/part_1_combinational/ArbiterTest.so new file mode 100755 index 0000000..8797abf Binary files /dev/null and b/part_1_combinational/ArbiterTest.so differ diff --git a/part_1_combinational/ShifterTest b/part_1_combinational/ShifterTest new file mode 100755 index 0000000..8ba01ae --- /dev/null +++ b/part_1_combinational/ShifterTest @@ -0,0 +1,12 @@ +#!/bin/sh + +BLUESPECDIR=`echo 'puts $env(BLUESPECDIR)' | bluetcl` + +for arg in $@ +do + if (test "$arg" = "-h") + then + exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTest --script_name `basename $0` -h + fi +done +exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTest --script_name `basename $0` --creation_time 1708621747 "$@" diff --git a/part_1_combinational/ShifterTest.so b/part_1_combinational/ShifterTest.so new file mode 100755 index 0000000..27c53f8 Binary files /dev/null and b/part_1_combinational/ShifterTest.so differ diff --git a/part_1_combinational/build/Alu.bo b/part_1_combinational/build/Alu.bo new file mode 100644 index 0000000..c55056c Binary files /dev/null and b/part_1_combinational/build/Alu.bo differ diff --git a/part_1_combinational/build/AluTest.bo b/part_1_combinational/build/AluTest.bo new file mode 100644 index 0000000..8038c7d Binary files /dev/null and b/part_1_combinational/build/AluTest.bo differ diff --git a/part_1_combinational/build/ArbiterTest.bo b/part_1_combinational/build/ArbiterTest.bo new file mode 100644 index 0000000..3d03ccd Binary files /dev/null and b/part_1_combinational/build/ArbiterTest.bo differ diff --git a/part_1_combinational/build/CombArbiter.bo b/part_1_combinational/build/CombArbiter.bo new file mode 100644 index 0000000..8ce8761 Binary files /dev/null and b/part_1_combinational/build/CombArbiter.bo differ diff --git a/part_1_combinational/build/Shifter.bo b/part_1_combinational/build/Shifter.bo new file mode 100644 index 0000000..24344ea Binary files /dev/null and b/part_1_combinational/build/Shifter.bo differ diff --git a/part_1_combinational/build/ShifterTest.bo b/part_1_combinational/build/ShifterTest.bo new file mode 100644 index 0000000..46becdd Binary files /dev/null and b/part_1_combinational/build/ShifterTest.bo differ diff --git a/part_1_combinational/build/mkTest.ba b/part_1_combinational/build/mkTest.ba new file mode 100644 index 0000000..0baff0b Binary files /dev/null and b/part_1_combinational/build/mkTest.ba differ diff --git a/part_1_combinational/build/mkTest.cxx b/part_1_combinational/build/mkTest.cxx new file mode 100644 index 0000000..e8d60fa --- /dev/null +++ b/part_1_combinational/build/mkTest.cxx @@ -0,0 +1,1719 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:07 CET 2024 + * + */ +#include "bluesim_primitives.h" +#include "mkTest.h" + + +/* String declarations */ +static std::string const __str_literal_6("", 0u); +static std::string const __str_literal_10("\n", 1u); +static std::string const __str_literal_5(" ", 1u); +static std::string const __str_literal_7(" >", 2u); +static std::string const __str_literal_8(" shifted left by %d ", 20u); +static std::string const __str_literal_4("'h%h", 4u); +static std::string const __str_literal_3(" INST_ctr_fsm; + MOD_Reg INST_going; + MOD_Wire INST_test_fsm_abort; + MOD_Reg INST_test_fsm_start_reg; + MOD_Reg INST_test_fsm_start_reg_1; + MOD_Wire INST_test_fsm_start_reg_2; + MOD_Wire INST_test_fsm_start_wire; + MOD_Reg INST_test_fsm_state_can_overlap; + MOD_Reg INST_test_fsm_state_fired; + MOD_Wire INST_test_fsm_state_fired_1; + MOD_ConfigReg INST_test_fsm_state_mkFSMstate; + MOD_Wire INST_test_fsm_state_overlap_pw; + MOD_Wire INST_test_fsm_state_set_pw; + MOD_RegFile INST_tests; + MOD_Reg INST_verbose; + + /* Constructor */ + public: + MOD_mkTest(tSimStateHdl simHdl, char const *name, Module *parent); + + /* Symbol init methods */ + private: + void init_symbols_0(); + + /* Reset signal definitions */ + private: + tUInt8 PORT_RST_N; + + /* Port definitions */ + public: + + /* Publicly accessible definitions */ + public: + tUInt8 DEF_WILL_FIRE_RL_test_fsm_action_l30c9; + tUInt8 DEF_WILL_FIRE_RL_test_fsm_action_l17c13; + tUInt8 DEF_WILL_FIRE_RL_test_fsm_action_l13c10; + tUInt32 DEF_x__h13119; + + /* Local definitions */ + private: + tUWide DEF_tests_sub_ctr_fsm_7_BITS_3_TO_0_5___d46; + + /* Rules */ + public: + void RL_test_fsm_start_reg__dreg_update(); + void RL_test_fsm_state_handle_abort(); + void RL_test_fsm_state_fired__dreg_update(); + void RL_test_fsm_state_every(); + void RL_test_fsm_restart(); + void RL_test_fsm_action_l13c10(); + void RL_test_fsm_action_l17c13(); + void RL_test_fsm_action_l30c9(); + void RL_test_fsm_idle_l12c7(); + void RL_test_fsm_fsm_start(); + void RL_start(); + void __me_check_5(); + void __me_check_6(); + + /* Methods */ + public: + + /* Reset routines */ + public: + void reset_RST_N(tUInt8 ARG_rst_in); + + /* Static handles to reset routines */ + public: + + /* Pointers to reset fns in parent module for asserting output resets */ + private: + + /* Functions for the parent module to register its reset fns */ + public: + + /* Functions to set the elaborated clock id */ + public: + void set_clk_0(char const *s); + + /* State dumping routine */ + public: + void dump_state(unsigned int indent); + + /* VCD dumping routines */ + public: + unsigned int dump_VCD_defs(unsigned int levels); + void dump_VCD(tVCDDumpType dt, unsigned int levels, MOD_mkTest &backing); + void vcd_defs(tVCDDumpType dt, MOD_mkTest &backing); + void vcd_prims(tVCDDumpType dt, MOD_mkTest &backing); +}; + +#endif /* ifndef __mkTest_h__ */ diff --git a/part_1_combinational/build/mkTest.o b/part_1_combinational/build/mkTest.o new file mode 100644 index 0000000..e1adb6f Binary files /dev/null and b/part_1_combinational/build/mkTest.o differ diff --git a/part_1_combinational/build/model_mkTest.cxx b/part_1_combinational/build/model_mkTest.cxx new file mode 100644 index 0000000..0da3801 --- /dev/null +++ b/part_1_combinational/build/model_mkTest.cxx @@ -0,0 +1,244 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:07 CET 2024 + * + */ +#include "bluesim_primitives.h" +#include "model_mkTest.h" + +#include +#include +#include "bluesim_kernel_api.h" +#include "bs_vcd.h" +#include "bs_reset.h" + + +/* Constructor */ +MODEL_mkTest::MODEL_mkTest() +{ + mkTest_instance = NULL; +} + +/* Function for creating a new model */ +void * new_MODEL_mkTest() +{ + MODEL_mkTest *model = new MODEL_mkTest(); + return (void *)(model); +} + +/* Schedule functions */ + +static void schedule_posedge_CLK(tSimStateHdl simHdl, void *instance_ptr) + { + MOD_mkTest &INST_top = *((MOD_mkTest *)(instance_ptr)); + tUInt8 DEF_INST_top_DEF_ctr_fsm_7_ULT_16___d38; + tUInt8 DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d42; + tUInt8 DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d217; + tUInt8 DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget___d6; + tUInt8 DEF_INST_top_DEF_NOT_test_fsm_start_wire_whas_OR_NOT_test_fsm_s_ETC___d11; + tUInt8 DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d28; + tUInt8 DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d35; + tUInt8 DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read__1_EQ_3___d34; + tUInt8 DEF_INST_top_DEF_going__h19625; + tUInt8 DEF_INST_top_DEF_test_fsm_start_reg__h19537; + tUInt8 DEF_INST_top_DEF_test_fsm_start_wire_wget____d9; + tUInt8 DEF_INST_top_DEF_test_fsm_start_wire_whas____d7; + tUInt8 DEF_INST_top_DEF_test_fsm_start_reg_1__h11507; + tUInt8 DEF_INST_top_DEF_test_fsm_abort_wget____d5; + tUInt8 DEF_INST_top_DEF_test_fsm_abort_whas____d4; + tUInt8 DEF_INST_top_DEF_test_fsm_state_fired__h11509; + tUInt8 DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read____d31; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_start_reg__dreg_update; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_start_reg__dreg_update; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_handle_abort; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_handle_abort; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_fired__dreg_update; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_fired__dreg_update; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_every; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_every; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_restart; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_restart; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l13c10; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l17c13; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l30c9; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_idle_l12c7; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_idle_l12c7; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_fsm_start; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_fsm_start; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_start; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_start; + tUInt8 DEF_INST_top_DEF_CAN_FIRE___me_check_5; + tUInt8 DEF_INST_top_DEF_WILL_FIRE___me_check_5; + tUInt8 DEF_INST_top_DEF_CAN_FIRE___me_check_6; + tUInt8 DEF_INST_top_DEF_WILL_FIRE___me_check_6; + DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read____d31 = INST_top.INST_test_fsm_state_mkFSMstate.METH_read(); + DEF_INST_top_DEF_test_fsm_state_fired__h11509 = INST_top.INST_test_fsm_state_fired.METH_read(); + DEF_INST_top_DEF_test_fsm_abort_whas____d4 = INST_top.INST_test_fsm_abort.METH_whas(); + DEF_INST_top_DEF_test_fsm_abort_wget____d5 = INST_top.INST_test_fsm_abort.METH_wget(); + DEF_INST_top_DEF_test_fsm_start_reg_1__h11507 = INST_top.INST_test_fsm_start_reg_1.METH_read(); + DEF_INST_top_DEF_test_fsm_start_reg__h19537 = INST_top.INST_test_fsm_start_reg.METH_read(); + DEF_INST_top_DEF_going__h19625 = INST_top.INST_going.METH_read(); + DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read__1_EQ_3___d34 = DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read____d31 == (tUInt8)3u; + DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget___d6 = DEF_INST_top_DEF_test_fsm_abort_whas____d4 && DEF_INST_top_DEF_test_fsm_abort_wget____d5; + DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d35 = (DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget___d6 || DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read____d31 == (tUInt8)0u) || DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read__1_EQ_3___d34; + DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d217 = DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d35 && (!DEF_INST_top_DEF_test_fsm_start_reg_1__h11507 || DEF_INST_top_DEF_test_fsm_state_fired__h11509); + DEF_INST_top_DEF_CAN_FIRE_RL_start = (DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d217 && !DEF_INST_top_DEF_test_fsm_start_reg__h19537) && !DEF_INST_top_DEF_going__h19625; + DEF_INST_top_DEF_WILL_FIRE_RL_start = DEF_INST_top_DEF_CAN_FIRE_RL_start; + INST_top.DEF_x__h13119 = INST_top.INST_ctr_fsm.METH_read(); + DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d28 = !DEF_INST_top_DEF_test_fsm_abort_whas____d4 || !DEF_INST_top_DEF_test_fsm_abort_wget____d5; + DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d42 = DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d28 && (DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read____d31 == (tUInt8)1u || DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read____d31 == (tUInt8)2u); + DEF_INST_top_DEF_ctr_fsm_7_ULT_16___d38 = (INST_top.DEF_x__h13119) < 16u; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l17c13 = DEF_INST_top_DEF_ctr_fsm_7_ULT_16___d38 && DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d42; + INST_top.DEF_WILL_FIRE_RL_test_fsm_action_l17c13 = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l17c13; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l30c9 = !DEF_INST_top_DEF_ctr_fsm_7_ULT_16___d38 && DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d42; + INST_top.DEF_WILL_FIRE_RL_test_fsm_action_l30c9 = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l30c9; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_fsm_start = DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d217 && DEF_INST_top_DEF_test_fsm_start_reg__h19537; + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_fsm_start = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_fsm_start; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_restart = (DEF_INST_top_DEF_test_fsm_start_reg_1__h11507 && !DEF_INST_top_DEF_test_fsm_state_fired__h11509) && DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d28; + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_restart = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_restart; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_start_reg__dreg_update = (tUInt8)1u; + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_start_reg__dreg_update = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_start_reg__dreg_update; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_every = (tUInt8)1u; + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_every = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_every; + DEF_INST_top_DEF_CAN_FIRE___me_check_5 = (tUInt8)1u; + DEF_INST_top_DEF_WILL_FIRE___me_check_5 = DEF_INST_top_DEF_CAN_FIRE___me_check_5; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_fired__dreg_update = (tUInt8)1u; + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_fired__dreg_update = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_fired__dreg_update; + DEF_INST_top_DEF_CAN_FIRE___me_check_6 = (tUInt8)1u; + DEF_INST_top_DEF_WILL_FIRE___me_check_6 = DEF_INST_top_DEF_CAN_FIRE___me_check_6; + if (DEF_INST_top_DEF_WILL_FIRE_RL_start) + INST_top.RL_start(); + if (INST_top.DEF_WILL_FIRE_RL_test_fsm_action_l17c13) + INST_top.RL_test_fsm_action_l17c13(); + if (INST_top.DEF_WILL_FIRE_RL_test_fsm_action_l30c9) + INST_top.RL_test_fsm_action_l30c9(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_restart) + INST_top.RL_test_fsm_restart(); + if (DEF_INST_top_DEF_WILL_FIRE___me_check_6) + INST_top.__me_check_6(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_fsm_start) + INST_top.RL_test_fsm_fsm_start(); + DEF_INST_top_DEF_test_fsm_start_wire_whas____d7 = INST_top.INST_test_fsm_start_wire.METH_whas(); + DEF_INST_top_DEF_test_fsm_start_wire_wget____d9 = INST_top.INST_test_fsm_start_wire.METH_wget(); + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l13c10 = ((DEF_INST_top_DEF_test_fsm_start_wire_whas____d7 && DEF_INST_top_DEF_test_fsm_start_wire_wget____d9) && DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget_OR_ETC___d35) && !(DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l30c9 || DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l17c13); + INST_top.DEF_WILL_FIRE_RL_test_fsm_action_l13c10 = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l13c10; + DEF_INST_top_DEF_NOT_test_fsm_start_wire_whas_OR_NOT_test_fsm_s_ETC___d11 = !DEF_INST_top_DEF_test_fsm_start_wire_whas____d7 || !DEF_INST_top_DEF_test_fsm_start_wire_wget____d9; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_idle_l12c7 = (DEF_INST_top_DEF_NOT_test_fsm_start_wire_whas_OR_NOT_test_fsm_s_ETC___d11 && (DEF_INST_top_DEF_NOT_test_fsm_abort_whas_6_OR_NOT_test_fsm_abor_ETC___d28 && DEF_INST_top_DEF_test_fsm_state_mkFSMstate_read__1_EQ_3___d34)) && !(DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l30c9 || DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l17c13); + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_idle_l12c7 = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_idle_l12c7; + DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_handle_abort = (DEF_INST_top_DEF_test_fsm_abort_whas_AND_test_fsm_abort_wget___d6 && DEF_INST_top_DEF_NOT_test_fsm_start_wire_whas_OR_NOT_test_fsm_s_ETC___d11) && !((DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l30c9 || DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_action_l17c13) || DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_restart); + DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_handle_abort = DEF_INST_top_DEF_CAN_FIRE_RL_test_fsm_state_handle_abort; + if (INST_top.DEF_WILL_FIRE_RL_test_fsm_action_l13c10) + INST_top.RL_test_fsm_action_l13c10(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_start_reg__dreg_update) + INST_top.RL_test_fsm_start_reg__dreg_update(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_handle_abort) + INST_top.RL_test_fsm_state_handle_abort(); + if (DEF_INST_top_DEF_WILL_FIRE___me_check_5) + INST_top.__me_check_5(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_idle_l12c7) + INST_top.RL_test_fsm_idle_l12c7(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_every) + INST_top.RL_test_fsm_state_every(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_test_fsm_state_fired__dreg_update) + INST_top.RL_test_fsm_state_fired__dreg_update(); + INST_top.INST_test_fsm_state_fired_1.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_test_fsm_state_overlap_pw.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_test_fsm_state_set_pw.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_test_fsm_abort.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_test_fsm_start_reg_2.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_test_fsm_start_wire.clk((tUInt8)1u, (tUInt8)1u); + if (do_reset_ticks(simHdl)) + { + INST_top.INST_verbose.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_ctr_fsm.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_test_fsm_start_reg.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_test_fsm_start_reg_1.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_test_fsm_state_mkFSMstate.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_test_fsm_state_fired.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_test_fsm_state_can_overlap.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_going.rst_tick__clk__1((tUInt8)1u); + } + }; + +/* Model creation/destruction functions */ + +void MODEL_mkTest::create_model(tSimStateHdl simHdl, bool master) +{ + sim_hdl = simHdl; + init_reset_request_counters(sim_hdl); + mkTest_instance = new MOD_mkTest(sim_hdl, "top", NULL); + bk_get_or_define_clock(sim_hdl, "CLK"); + if (master) + { + bk_alter_clock(sim_hdl, bk_get_clock_by_name(sim_hdl, "CLK"), CLK_LOW, false, 0llu, 5llu, 5llu); + bk_use_default_reset(sim_hdl); + } + bk_set_clock_event_fn(sim_hdl, + bk_get_clock_by_name(sim_hdl, "CLK"), + schedule_posedge_CLK, + NULL, + (tEdgeDirection)(POSEDGE)); + (mkTest_instance->INST_test_fsm_start_wire.set_clk_0)("CLK"); + (mkTest_instance->INST_test_fsm_start_reg_2.set_clk_0)("CLK"); + (mkTest_instance->INST_test_fsm_abort.set_clk_0)("CLK"); + (mkTest_instance->INST_test_fsm_state_set_pw.set_clk_0)("CLK"); + (mkTest_instance->INST_test_fsm_state_overlap_pw.set_clk_0)("CLK"); + (mkTest_instance->INST_test_fsm_state_fired_1.set_clk_0)("CLK"); + (mkTest_instance->set_clk_0)("CLK"); +} +void MODEL_mkTest::destroy_model() +{ + delete mkTest_instance; + mkTest_instance = NULL; +} +void MODEL_mkTest::reset_model(bool asserted) +{ + (mkTest_instance->reset_RST_N)(asserted ? (tUInt8)0u : (tUInt8)1u); +} +void * MODEL_mkTest::get_instance() +{ + return mkTest_instance; +} + +/* Fill in version numbers */ +void MODEL_mkTest::get_version(char const **name, char const **build) +{ + *name = "2023.07-39-g15463f50"; + *build = "15463f50"; +} + +/* Get the model creation time */ +time_t MODEL_mkTest::get_creation_time() +{ + + /* Thu Feb 22 17:09:07 UTC 2024 */ + return 1708621747llu; +} + +/* State dumping function */ +void MODEL_mkTest::dump_state() +{ + (mkTest_instance->dump_state)(0u); +} + +/* VCD dumping functions */ +MOD_mkTest & mkTest_backing(tSimStateHdl simHdl) +{ + static MOD_mkTest *instance = NULL; + if (instance == NULL) + { + vcd_set_backing_instance(simHdl, true); + instance = new MOD_mkTest(simHdl, "top", NULL); + vcd_set_backing_instance(simHdl, false); + } + return *instance; +} +void MODEL_mkTest::dump_VCD_defs() +{ + (mkTest_instance->dump_VCD_defs)(vcd_depth(sim_hdl)); +} +void MODEL_mkTest::dump_VCD(tVCDDumpType dt) +{ + (mkTest_instance->dump_VCD)(dt, vcd_depth(sim_hdl), mkTest_backing(sim_hdl)); +} diff --git a/part_1_combinational/build/model_mkTest.h b/part_1_combinational/build/model_mkTest.h new file mode 100644 index 0000000..863d1b1 --- /dev/null +++ b/part_1_combinational/build/model_mkTest.h @@ -0,0 +1,53 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:07 CET 2024 + * + */ + +/* Generation options: */ +#ifndef __model_mkTest_h__ +#define __model_mkTest_h__ + +#include "bluesim_types.h" +#include "bs_module.h" +#include "bluesim_primitives.h" +#include "bs_vcd.h" + +#include "bs_model.h" +#include "mkTest.h" + +/* Class declaration for a model of mkTest */ +class MODEL_mkTest : public Model { + + /* Top-level module instance */ + private: + MOD_mkTest *mkTest_instance; + + /* Handle to the simulation kernel */ + private: + tSimStateHdl sim_hdl; + + /* Constructor */ + public: + MODEL_mkTest(); + + /* Functions required by the kernel */ + public: + void create_model(tSimStateHdl simHdl, bool master); + void destroy_model(); + void reset_model(bool asserted); + void get_version(char const **name, char const **build); + time_t get_creation_time(); + void * get_instance(); + void dump_state(); + void dump_VCD_defs(); + void dump_VCD(tVCDDumpType dt); +}; + +/* Function for creating a new model */ +extern "C" { + void * new_MODEL_mkTest(); +} + +#endif /* ifndef __model_mkTest_h__ */ diff --git a/part_1_combinational/build/model_mkTest.o b/part_1_combinational/build/model_mkTest.o new file mode 100644 index 0000000..7d74562 Binary files /dev/null and b/part_1_combinational/build/model_mkTest.o differ diff --git a/part_2_vector_multiply/TbVD b/part_2_vector_multiply/TbVD new file mode 100755 index 0000000..a377dd1 --- /dev/null +++ b/part_2_vector_multiply/TbVD @@ -0,0 +1,12 @@ +#!/bin/sh + +BLUESPECDIR=`echo 'puts $env(BLUESPECDIR)' | bluetcl` + +for arg in $@ +do + if (test "$arg" = "-h") + then + exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTb --script_name `basename $0` -h + fi +done +exec $BLUESPECDIR/tcllib/bluespec/bluesim.tcl $0.so mkTb --script_name `basename $0` --creation_time 1708621749 "$@" diff --git a/part_2_vector_multiply/TbVD.so b/part_2_vector_multiply/TbVD.so new file mode 100755 index 0000000..929de92 Binary files /dev/null and b/part_2_vector_multiply/TbVD.so differ diff --git a/part_2_vector_multiply/build/TbVD.bo b/part_2_vector_multiply/build/TbVD.bo new file mode 100644 index 0000000..50a0e50 Binary files /dev/null and b/part_2_vector_multiply/build/TbVD.bo differ diff --git a/part_2_vector_multiply/build/VectorDot.bo b/part_2_vector_multiply/build/VectorDot.bo new file mode 100644 index 0000000..ac68b6a Binary files /dev/null and b/part_2_vector_multiply/build/VectorDot.bo differ diff --git a/part_2_vector_multiply/build/mkTb.ba b/part_2_vector_multiply/build/mkTb.ba new file mode 100644 index 0000000..0e6ff1c Binary files /dev/null and b/part_2_vector_multiply/build/mkTb.ba differ diff --git a/part_2_vector_multiply/build/mkTb.cxx b/part_2_vector_multiply/build/mkTb.cxx new file mode 100644 index 0000000..13a3478 --- /dev/null +++ b/part_2_vector_multiply/build/mkTb.cxx @@ -0,0 +1,228 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:09 CET 2024 + * + */ +#include "bluesim_primitives.h" +#include "mkTb.h" + + +/* String declarations */ +static std::string const __str_literal_4("", 0u); +static std::string const __str_literal_6("Expected %d for test %d", 23u); +static std::string const __str_literal_3("GOT ", 4u); +static std::string const __str_literal_2("STARTING TEST FOR VECTOR DOT PRODUCT DIM 16... index %d", + 55u); +static std::string const __str_literal_5("Test %d passed", 14u); +static std::string const __str_literal_1("v3.hex", 6u); + + +/* Constructor */ +MOD_mkTb::MOD_mkTb(tSimStateHdl simHdl, char const *name, Module *parent) + : Module(simHdl, name, parent), + __clk_handle_0(BAD_CLOCK_HANDLE), + INST_ctr(simHdl, "ctr", this, 32u, 0u, (tUInt8)0u), + INST_going(simHdl, "going", this, 1u, (tUInt8)1u, (tUInt8)0u), + INST_i(simHdl, "i", this, 2u, (tUInt8)0u, (tUInt8)0u), + INST_mma(simHdl, "mma", this), + INST_tests(simHdl, "tests", this, __str_literal_1, 2u, 32u, (tUInt8)0u, (tUInt8)3u, (tUInt8)0u), + PORT_RST_N((tUInt8)1u) +{ + symbol_count = 8u; + symbols = new tSym[symbol_count]; + init_symbols_0(); +} + + +/* Symbol init fns */ + +void MOD_mkTb::init_symbols_0() +{ + init_symbol(&symbols[0u], "ctr", SYM_MODULE, &INST_ctr); + init_symbol(&symbols[1u], "going", SYM_MODULE, &INST_going); + init_symbol(&symbols[2u], "i", SYM_MODULE, &INST_i); + init_symbol(&symbols[3u], "mma", SYM_MODULE, &INST_mma); + init_symbol(&symbols[4u], "RL_inc_ctr", SYM_RULE); + init_symbol(&symbols[5u], "RL_resp", SYM_RULE); + init_symbol(&symbols[6u], "RL_start", SYM_RULE); + init_symbol(&symbols[7u], "tests", SYM_MODULE, &INST_tests); +} + + +/* Rule actions */ + +void MOD_mkTb::RL_inc_ctr() +{ + tUInt32 DEF_ctr_PLUS_1___d2; + tUInt32 DEF_b__h75; + DEF_b__h75 = INST_ctr.METH_read(); + DEF_ctr_PLUS_1___d2 = DEF_b__h75 + 1u; + INST_ctr.METH_write(DEF_ctr_PLUS_1___d2); +} + +void MOD_mkTb::RL_start() +{ + DEF_i__h583 = INST_i.METH_read(); + if (!(PORT_RST_N == (tUInt8)0u)) + dollar_display(sim_hdl, this, "s,2", &__str_literal_2, DEF_i__h583); + INST_going.METH_write((tUInt8)0u); + INST_mma.METH_start((tUInt8)16u, DEF_i__h583); +} + +void MOD_mkTb::RL_resp() +{ + tUInt8 DEF_x__h630; + tUInt8 DEF_NOT_mma_response_0_EQ_tests_sub_i_1_2___d13; + tUInt8 DEF_NOT_i_EQ_3_4___d15; + tUInt8 DEF_i_EQ_3___d14; + tUInt8 DEF_mma_response_0_EQ_tests_sub_i_1___d12; + tUInt32 DEF_x__h584; + tUInt32 DEF_v__h463; + tUInt32 DEF_AVMeth_mma_response; + DEF_i__h583 = INST_i.METH_read(); + DEF_x__h584 = INST_tests.METH_sub(DEF_i__h583); + DEF_i_EQ_3___d14 = DEF_i__h583 == (tUInt8)3u; + DEF_NOT_i_EQ_3_4___d15 = !DEF_i_EQ_3___d14; + DEF_x__h630 = (tUInt8)3u & (DEF_i__h583 + (tUInt8)1u); + DEF_AVMeth_mma_response = INST_mma.METH_response(); + DEF_v__h463 = DEF_AVMeth_mma_response; + DEF_mma_response_0_EQ_tests_sub_i_1___d12 = DEF_v__h463 == DEF_x__h584; + DEF_NOT_mma_response_0_EQ_tests_sub_i_1_2___d13 = !DEF_mma_response_0_EQ_tests_sub_i_1___d12; + if (!(PORT_RST_N == (tUInt8)0u)) + { + dollar_display(sim_hdl, this, "s,32,s", &__str_literal_3, DEF_v__h463, &__str_literal_4); + if (DEF_mma_response_0_EQ_tests_sub_i_1___d12) + dollar_display(sim_hdl, this, "s,2", &__str_literal_5, DEF_i__h583); + if (DEF_NOT_mma_response_0_EQ_tests_sub_i_1_2___d13) + dollar_display(sim_hdl, this, "s,32,2", &__str_literal_6, DEF_x__h584, DEF_i__h583); + } + INST_going.METH_write((tUInt8)1u); + if (!(PORT_RST_N == (tUInt8)0u)) + if (DEF_i_EQ_3___d14) + dollar_finish(sim_hdl, "32", 1u); + if (DEF_NOT_i_EQ_3_4___d15) + INST_i.METH_write(DEF_x__h630); +} + + +/* Methods */ + + +/* Reset routines */ + +void MOD_mkTb::reset_RST_N(tUInt8 ARG_rst_in) +{ + PORT_RST_N = ARG_rst_in; + INST_mma.reset_RST_N(ARG_rst_in); + INST_i.reset_RST(ARG_rst_in); + INST_going.reset_RST(ARG_rst_in); + INST_ctr.reset_RST(ARG_rst_in); +} + + +/* Static handles to reset routines */ + + +/* Functions for the parent module to register its reset fns */ + + +/* Functions to set the elaborated clock id */ + +void MOD_mkTb::set_clk_0(char const *s) +{ + __clk_handle_0 = bk_get_or_define_clock(sim_hdl, s); +} + + +/* State dumping routine */ +void MOD_mkTb::dump_state(unsigned int indent) +{ + printf("%*s%s:\n", indent, "", inst_name); + INST_ctr.dump_state(indent + 2u); + INST_going.dump_state(indent + 2u); + INST_i.dump_state(indent + 2u); + INST_mma.dump_state(indent + 2u); + INST_tests.dump_state(indent + 2u); +} + + +/* VCD dumping routines */ + +unsigned int MOD_mkTb::dump_VCD_defs(unsigned int levels) +{ + vcd_write_scope_start(sim_hdl, inst_name); + vcd_num = vcd_reserve_ids(sim_hdl, 6u); + unsigned int num = vcd_num; + for (unsigned int clk = 0u; clk < bk_num_clocks(sim_hdl); ++clk) + vcd_add_clock_def(sim_hdl, this, bk_clock_name(sim_hdl, clk), bk_clock_vcd_num(sim_hdl, clk)); + vcd_write_def(sim_hdl, bk_clock_vcd_num(sim_hdl, __clk_handle_0), "CLK", 1u); + vcd_write_def(sim_hdl, num++, "RST_N", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "i__h583", 2u); + num = INST_ctr.dump_VCD_defs(num); + num = INST_going.dump_VCD_defs(num); + num = INST_i.dump_VCD_defs(num); + num = INST_tests.dump_VCD_defs(num); + if (levels != 1u) + { + unsigned int l = levels == 0u ? 0u : levels - 1u; + num = INST_mma.dump_VCD_defs(l); + } + vcd_write_scope_end(sim_hdl); + return num; +} + +void MOD_mkTb::dump_VCD(tVCDDumpType dt, unsigned int levels, MOD_mkTb &backing) +{ + vcd_defs(dt, backing); + vcd_prims(dt, backing); + if (levels != 1u) + vcd_submodules(dt, levels - 1u, backing); +} + +void MOD_mkTb::vcd_defs(tVCDDumpType dt, MOD_mkTb &backing) +{ + unsigned int num = vcd_num; + if (dt == VCD_DUMP_XS) + { + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 2u); + } + else + if (dt == VCD_DUMP_CHANGES) + { + if ((backing.PORT_RST_N) != PORT_RST_N) + { + vcd_write_val(sim_hdl, num, PORT_RST_N, 1u); + backing.PORT_RST_N = PORT_RST_N; + } + ++num; + if ((backing.DEF_i__h583) != DEF_i__h583) + { + vcd_write_val(sim_hdl, num, DEF_i__h583, 2u); + backing.DEF_i__h583 = DEF_i__h583; + } + ++num; + } + else + { + vcd_write_val(sim_hdl, num++, PORT_RST_N, 1u); + backing.PORT_RST_N = PORT_RST_N; + vcd_write_val(sim_hdl, num++, DEF_i__h583, 2u); + backing.DEF_i__h583 = DEF_i__h583; + } +} + +void MOD_mkTb::vcd_prims(tVCDDumpType dt, MOD_mkTb &backing) +{ + INST_ctr.dump_VCD(dt, backing.INST_ctr); + INST_going.dump_VCD(dt, backing.INST_going); + INST_i.dump_VCD(dt, backing.INST_i); + INST_tests.dump_VCD(dt, backing.INST_tests); +} + +void MOD_mkTb::vcd_submodules(tVCDDumpType dt, unsigned int levels, MOD_mkTb &backing) +{ + INST_mma.dump_VCD(dt, levels, backing.INST_mma); +} diff --git a/part_2_vector_multiply/build/mkTb.h b/part_2_vector_multiply/build/mkTb.h new file mode 100644 index 0000000..7e0ed89 --- /dev/null +++ b/part_2_vector_multiply/build/mkTb.h @@ -0,0 +1,102 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:09 CET 2024 + * + */ + +/* Generation options: */ +#ifndef __mkTb_h__ +#define __mkTb_h__ + +#include "bluesim_types.h" +#include "bs_module.h" +#include "bluesim_primitives.h" +#include "bs_vcd.h" +#include "mkVectorDot.h" + + +/* Class declaration for the mkTb module */ +class MOD_mkTb : public Module { + + /* Clock handles */ + private: + tClock __clk_handle_0; + + /* Clock gate handles */ + public: + tUInt8 *clk_gate[0]; + + /* Instantiation parameters */ + public: + + /* Module state */ + public: + MOD_Reg INST_ctr; + MOD_Reg INST_going; + MOD_Reg INST_i; + MOD_mkVectorDot INST_mma; + MOD_RegFile INST_tests; + + /* Constructor */ + public: + MOD_mkTb(tSimStateHdl simHdl, char const *name, Module *parent); + + /* Symbol init methods */ + private: + void init_symbols_0(); + + /* Reset signal definitions */ + private: + tUInt8 PORT_RST_N; + + /* Port definitions */ + public: + + /* Publicly accessible definitions */ + public: + + /* Local definitions */ + private: + tUInt8 DEF_i__h583; + + /* Rules */ + public: + void RL_inc_ctr(); + void RL_start(); + void RL_resp(); + + /* Methods */ + public: + + /* Reset routines */ + public: + void reset_RST_N(tUInt8 ARG_rst_in); + + /* Static handles to reset routines */ + public: + + /* Pointers to reset fns in parent module for asserting output resets */ + private: + + /* Functions for the parent module to register its reset fns */ + public: + + /* Functions to set the elaborated clock id */ + public: + void set_clk_0(char const *s); + + /* State dumping routine */ + public: + void dump_state(unsigned int indent); + + /* VCD dumping routines */ + public: + unsigned int dump_VCD_defs(unsigned int levels); + void dump_VCD(tVCDDumpType dt, unsigned int levels, MOD_mkTb &backing); + void vcd_defs(tVCDDumpType dt, MOD_mkTb &backing); + void vcd_prims(tVCDDumpType dt, MOD_mkTb &backing); + void vcd_submodules(tVCDDumpType dt, unsigned int levels, MOD_mkTb &backing); +}; + +#endif /* ifndef __mkTb_h__ */ diff --git a/part_2_vector_multiply/build/mkTb.o b/part_2_vector_multiply/build/mkTb.o new file mode 100644 index 0000000..85c80d8 Binary files /dev/null and b/part_2_vector_multiply/build/mkTb.o differ diff --git a/part_2_vector_multiply/build/mkVectorDot.ba b/part_2_vector_multiply/build/mkVectorDot.ba new file mode 100644 index 0000000..09549f3 Binary files /dev/null and b/part_2_vector_multiply/build/mkVectorDot.ba differ diff --git a/part_2_vector_multiply/build/mkVectorDot.cxx b/part_2_vector_multiply/build/mkVectorDot.cxx new file mode 100644 index 0000000..3912626 --- /dev/null +++ b/part_2_vector_multiply/build/mkVectorDot.cxx @@ -0,0 +1,984 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:09 CET 2024 + * + */ +#include "bluesim_primitives.h" +#include "mkVectorDot.h" + + +/* String declarations */ +static std::string const __str_literal_3("ERROR: %m: mkBRAMAdapter overrun", 32u); +static std::string const __str_literal_1("v1.hex", 6u); +static std::string const __str_literal_2("v2.hex", 6u); + + +/* Constructor */ +MOD_mkVectorDot::MOD_mkVectorDot(tSimStateHdl simHdl, char const *name, Module *parent) + : Module(simHdl, name, parent), + __clk_handle_0(BAD_CLOCK_HANDLE), + INST_a_memory(simHdl, "a_memory", this, __str_literal_1, (tUInt8)0u, 8u, 32u, 256u, (tUInt8)0u, 1u), + INST_a_serverAdapter_cnt(simHdl, "a_serverAdapter_cnt", this, 3u, (tUInt8)0u, (tUInt8)0u), + INST_a_serverAdapter_cnt_1(simHdl, "a_serverAdapter_cnt_1", this, 3u, (tUInt8)0u), + INST_a_serverAdapter_cnt_2(simHdl, "a_serverAdapter_cnt_2", this, 3u, (tUInt8)0u), + INST_a_serverAdapter_cnt_3(simHdl, "a_serverAdapter_cnt_3", this, 3u, (tUInt8)0u), + INST_a_serverAdapter_outData_beforeDeq(simHdl, + "a_serverAdapter_outData_beforeDeq", + this, + 1u, + (tUInt8)1u), + INST_a_serverAdapter_outData_beforeEnq(simHdl, + "a_serverAdapter_outData_beforeEnq", + this, + 1u, + (tUInt8)1u), + INST_a_serverAdapter_outData_dequeueing(simHdl, "a_serverAdapter_outData_dequeueing", this, 0u), + INST_a_serverAdapter_outData_enqw(simHdl, "a_serverAdapter_outData_enqw", this, 32u, (tUInt8)0u), + INST_a_serverAdapter_outData_ff(simHdl, + "a_serverAdapter_outData_ff", + this, + 32u, + 3u, + (tUInt8)0u, + 0u), + INST_a_serverAdapter_s1(simHdl, "a_serverAdapter_s1", this, 2u, (tUInt8)0u, (tUInt8)0u), + INST_a_serverAdapter_s1_1(simHdl, "a_serverAdapter_s1_1", this, 2u, (tUInt8)0u), + INST_a_serverAdapter_writeWithResp(simHdl, "a_serverAdapter_writeWithResp", this, 2u, (tUInt8)0u), + INST_b_memory(simHdl, "b_memory", this, __str_literal_2, (tUInt8)0u, 8u, 32u, 256u, (tUInt8)0u, 1u), + INST_b_serverAdapter_cnt(simHdl, "b_serverAdapter_cnt", this, 3u, (tUInt8)0u, (tUInt8)0u), + INST_b_serverAdapter_cnt_1(simHdl, "b_serverAdapter_cnt_1", this, 3u, (tUInt8)0u), + INST_b_serverAdapter_cnt_2(simHdl, "b_serverAdapter_cnt_2", this, 3u, (tUInt8)0u), + INST_b_serverAdapter_cnt_3(simHdl, "b_serverAdapter_cnt_3", this, 3u, (tUInt8)0u), + INST_b_serverAdapter_outData_beforeDeq(simHdl, + "b_serverAdapter_outData_beforeDeq", + this, + 1u, + (tUInt8)1u), + INST_b_serverAdapter_outData_beforeEnq(simHdl, + "b_serverAdapter_outData_beforeEnq", + this, + 1u, + (tUInt8)1u), + INST_b_serverAdapter_outData_dequeueing(simHdl, "b_serverAdapter_outData_dequeueing", this, 0u), + INST_b_serverAdapter_outData_enqw(simHdl, "b_serverAdapter_outData_enqw", this, 32u, (tUInt8)0u), + INST_b_serverAdapter_outData_ff(simHdl, + "b_serverAdapter_outData_ff", + this, + 32u, + 3u, + (tUInt8)0u, + 0u), + INST_b_serverAdapter_s1(simHdl, "b_serverAdapter_s1", this, 2u, (tUInt8)0u, (tUInt8)0u), + INST_b_serverAdapter_s1_1(simHdl, "b_serverAdapter_s1_1", this, 2u, (tUInt8)0u), + INST_b_serverAdapter_writeWithResp(simHdl, "b_serverAdapter_writeWithResp", this, 2u, (tUInt8)0u), + INST_dim(simHdl, "dim", this, 8u, (tUInt8)0u, (tUInt8)0u), + INST_done_a(simHdl, "done_a", this, 1u, (tUInt8)0u, (tUInt8)0u), + INST_done_all(simHdl, "done_all", this, 1u, (tUInt8)0u, (tUInt8)0u), + INST_done_b(simHdl, "done_b", this, 1u, (tUInt8)0u, (tUInt8)0u), + INST_i(simHdl, "i", this, 2u, (tUInt8)0u, (tUInt8)0u), + INST_output_res(simHdl, "output_res", this, 32u, 0u, (tUInt8)0u), + INST_pos_a(simHdl, "pos_a", this, 8u, (tUInt8)0u, (tUInt8)0u), + INST_pos_b(simHdl, "pos_b", this, 8u, (tUInt8)0u, (tUInt8)0u), + INST_pos_out(simHdl, "pos_out", this, 8u, (tUInt8)0u, (tUInt8)0u), + INST_ready_start(simHdl, "ready_start", this, 1u, (tUInt8)0u, (tUInt8)0u), + INST_req_a_ready(simHdl, "req_a_ready", this, 1u, (tUInt8)0u, (tUInt8)0u), + INST_req_b_ready(simHdl, "req_b_ready", this, 1u, (tUInt8)0u, (tUInt8)0u), + PORT_RST_N((tUInt8)1u) +{ + symbol_count = 59u; + symbols = new tSym[symbol_count]; + init_symbols_0(); +} + + +/* Symbol init fns */ + +void MOD_mkVectorDot::init_symbols_0() +{ + init_symbol(&symbols[0u], "a_memory", SYM_MODULE, &INST_a_memory); + init_symbol(&symbols[1u], "a_serverAdapter_cnt", SYM_MODULE, &INST_a_serverAdapter_cnt); + init_symbol(&symbols[2u], "a_serverAdapter_cnt_1", SYM_MODULE, &INST_a_serverAdapter_cnt_1); + init_symbol(&symbols[3u], "a_serverAdapter_cnt_2", SYM_MODULE, &INST_a_serverAdapter_cnt_2); + init_symbol(&symbols[4u], "a_serverAdapter_cnt_3", SYM_MODULE, &INST_a_serverAdapter_cnt_3); + init_symbol(&symbols[5u], + "a_serverAdapter_outData_beforeDeq", + SYM_MODULE, + &INST_a_serverAdapter_outData_beforeDeq); + init_symbol(&symbols[6u], + "a_serverAdapter_outData_beforeEnq", + SYM_MODULE, + &INST_a_serverAdapter_outData_beforeEnq); + init_symbol(&symbols[7u], + "a_serverAdapter_outData_dequeueing", + SYM_MODULE, + &INST_a_serverAdapter_outData_dequeueing); + init_symbol(&symbols[8u], + "a_serverAdapter_outData_enqw", + SYM_MODULE, + &INST_a_serverAdapter_outData_enqw); + init_symbol(&symbols[9u], + "a_serverAdapter_outData_ff", + SYM_MODULE, + &INST_a_serverAdapter_outData_ff); + init_symbol(&symbols[10u], "a_serverAdapter_s1", SYM_MODULE, &INST_a_serverAdapter_s1); + init_symbol(&symbols[11u], "a_serverAdapter_s1_1", SYM_MODULE, &INST_a_serverAdapter_s1_1); + init_symbol(&symbols[12u], + "a_serverAdapter_writeWithResp", + SYM_MODULE, + &INST_a_serverAdapter_writeWithResp); + init_symbol(&symbols[13u], "b__h2341", SYM_DEF, &DEF_b__h2341, 3u); + init_symbol(&symbols[14u], "b__h868", SYM_DEF, &DEF_b__h868, 3u); + init_symbol(&symbols[15u], "b_memory", SYM_MODULE, &INST_b_memory); + init_symbol(&symbols[16u], "b_serverAdapter_cnt", SYM_MODULE, &INST_b_serverAdapter_cnt); + init_symbol(&symbols[17u], "b_serverAdapter_cnt_1", SYM_MODULE, &INST_b_serverAdapter_cnt_1); + init_symbol(&symbols[18u], "b_serverAdapter_cnt_2", SYM_MODULE, &INST_b_serverAdapter_cnt_2); + init_symbol(&symbols[19u], "b_serverAdapter_cnt_3", SYM_MODULE, &INST_b_serverAdapter_cnt_3); + init_symbol(&symbols[20u], + "b_serverAdapter_outData_beforeDeq", + SYM_MODULE, + &INST_b_serverAdapter_outData_beforeDeq); + init_symbol(&symbols[21u], + "b_serverAdapter_outData_beforeEnq", + SYM_MODULE, + &INST_b_serverAdapter_outData_beforeEnq); + init_symbol(&symbols[22u], + "b_serverAdapter_outData_dequeueing", + SYM_MODULE, + &INST_b_serverAdapter_outData_dequeueing); + init_symbol(&symbols[23u], + "b_serverAdapter_outData_enqw", + SYM_MODULE, + &INST_b_serverAdapter_outData_enqw); + init_symbol(&symbols[24u], + "b_serverAdapter_outData_ff", + SYM_MODULE, + &INST_b_serverAdapter_outData_ff); + init_symbol(&symbols[25u], "b_serverAdapter_s1", SYM_MODULE, &INST_b_serverAdapter_s1); + init_symbol(&symbols[26u], "b_serverAdapter_s1_1", SYM_MODULE, &INST_b_serverAdapter_s1_1); + init_symbol(&symbols[27u], + "b_serverAdapter_writeWithResp", + SYM_MODULE, + &INST_b_serverAdapter_writeWithResp); + init_symbol(&symbols[28u], "dim", SYM_MODULE, &INST_dim); + init_symbol(&symbols[29u], "done_a", SYM_MODULE, &INST_done_a); + init_symbol(&symbols[30u], "done_all", SYM_MODULE, &INST_done_all); + init_symbol(&symbols[31u], "done_all__h3778", SYM_DEF, &DEF_done_all__h3778, 1u); + init_symbol(&symbols[32u], "done_b", SYM_MODULE, &INST_done_b); + init_symbol(&symbols[33u], "i", SYM_MODULE, &INST_i); + init_symbol(&symbols[34u], "output_res", SYM_MODULE, &INST_output_res); + init_symbol(&symbols[35u], "pos_a", SYM_MODULE, &INST_pos_a); + init_symbol(&symbols[36u], "pos_b", SYM_MODULE, &INST_pos_b); + init_symbol(&symbols[37u], "pos_out", SYM_MODULE, &INST_pos_out); + init_symbol(&symbols[38u], "RL_a_serverAdapter_cnt_finalAdd", SYM_RULE); + init_symbol(&symbols[39u], "RL_a_serverAdapter_moveToOutFIFO", SYM_RULE); + init_symbol(&symbols[40u], "RL_a_serverAdapter_outData_dequeue", SYM_RULE); + init_symbol(&symbols[41u], "RL_a_serverAdapter_outData_enqueue", SYM_RULE); + init_symbol(&symbols[42u], "RL_a_serverAdapter_overRun", SYM_RULE); + init_symbol(&symbols[43u], "RL_a_serverAdapter_s1__dreg_update", SYM_RULE); + init_symbol(&symbols[44u], "RL_a_serverAdapter_stageReadResponseAlways", SYM_RULE); + init_symbol(&symbols[45u], "RL_b_serverAdapter_cnt_finalAdd", SYM_RULE); + init_symbol(&symbols[46u], "RL_b_serverAdapter_moveToOutFIFO", SYM_RULE); + init_symbol(&symbols[47u], "RL_b_serverAdapter_outData_dequeue", SYM_RULE); + init_symbol(&symbols[48u], "RL_b_serverAdapter_outData_enqueue", SYM_RULE); + init_symbol(&symbols[49u], "RL_b_serverAdapter_overRun", SYM_RULE); + init_symbol(&symbols[50u], "RL_b_serverAdapter_s1__dreg_update", SYM_RULE); + init_symbol(&symbols[51u], "RL_b_serverAdapter_stageReadResponseAlways", SYM_RULE); + init_symbol(&symbols[52u], "RL_mult_inputs", SYM_RULE); + init_symbol(&symbols[53u], "RL_process_a", SYM_RULE); + init_symbol(&symbols[54u], "RL_process_b", SYM_RULE); + init_symbol(&symbols[55u], "ready_start", SYM_MODULE, &INST_ready_start); + init_symbol(&symbols[56u], "ready_start__h3375", SYM_DEF, &DEF_ready_start__h3375, 1u); + init_symbol(&symbols[57u], "req_a_ready", SYM_MODULE, &INST_req_a_ready); + init_symbol(&symbols[58u], "req_b_ready", SYM_MODULE, &INST_req_b_ready); +} + + +/* Rule actions */ + +void MOD_mkVectorDot::RL_a_serverAdapter_outData_enqueue() +{ + DEF_x_wget__h374 = INST_a_serverAdapter_outData_enqw.METH_wget(); + DEF_x__h472 = DEF_x_wget__h374; + INST_a_serverAdapter_outData_ff.METH_enq(DEF_x__h472); +} + +void MOD_mkVectorDot::RL_a_serverAdapter_outData_dequeue() +{ + INST_a_serverAdapter_outData_ff.METH_deq(); +} + +void MOD_mkVectorDot::RL_a_serverAdapter_cnt_finalAdd() +{ + tUInt8 DEF_IF_a_serverAdapter_cnt_3_whas__3_THEN_a_server_ETC___d23; + tUInt8 DEF_b__h875; + tUInt8 DEF_b__h912; + tUInt8 DEF_b__h848; + DEF_b__h848 = INST_a_serverAdapter_cnt_3.METH_wget(); + DEF_b__h912 = INST_a_serverAdapter_cnt_2.METH_wget(); + DEF_b__h875 = INST_a_serverAdapter_cnt_1.METH_wget(); + DEF_b__h868 = INST_a_serverAdapter_cnt.METH_read(); + DEF_a_serverAdapter_cnt_3_whas____d13 = INST_a_serverAdapter_cnt_3.METH_whas(); + DEF_a_serverAdapter_cnt_2_whas____d11 = INST_a_serverAdapter_cnt_2.METH_whas(); + DEF_a_serverAdapter_cnt_1_whas____d10 = INST_a_serverAdapter_cnt_1.METH_whas(); + DEF_IF_a_serverAdapter_cnt_3_whas__3_THEN_a_server_ETC___d23 = DEF_a_serverAdapter_cnt_3_whas____d13 ? DEF_b__h848 : (tUInt8)7u & (((tUInt8)7u & (DEF_b__h868 + (DEF_a_serverAdapter_cnt_1_whas____d10 ? DEF_b__h875 : (tUInt8)0u))) + (DEF_a_serverAdapter_cnt_2_whas____d11 ? DEF_b__h912 : (tUInt8)0u)); + INST_a_serverAdapter_cnt.METH_write(DEF_IF_a_serverAdapter_cnt_3_whas__3_THEN_a_server_ETC___d23); +} + +void MOD_mkVectorDot::RL_a_serverAdapter_s1__dreg_update() +{ + tUInt8 DEF_IF_a_serverAdapter_s1_1_whas__4_THEN_a_serverA_ETC___d27; + DEF__0_CONCAT_DONTCARE___d26 = (tUInt8)0u; + DEF_IF_a_serverAdapter_s1_1_whas__4_THEN_a_serverA_ETC___d27 = INST_a_serverAdapter_s1_1.METH_whas() ? INST_a_serverAdapter_s1_1.METH_wget() : DEF__0_CONCAT_DONTCARE___d26; + INST_a_serverAdapter_s1.METH_write(DEF_IF_a_serverAdapter_s1_1_whas__4_THEN_a_serverA_ETC___d27); +} + +void MOD_mkVectorDot::RL_a_serverAdapter_stageReadResponseAlways() +{ + tUInt8 DEF_NOT_a_serverAdapter_writeWithResp_wget__9_BIT__ETC___d33; + tUInt8 DEF__1_CONCAT_NOT_a_serverAdapter_writeWithResp_wge_ETC___d34; + tUInt8 DEF_a_serverAdapter_writeWithResp_wget____d29; + DEF_a_serverAdapter_writeWithResp_wget____d29 = INST_a_serverAdapter_writeWithResp.METH_wget(); + DEF_NOT_a_serverAdapter_writeWithResp_wget__9_BIT__ETC___d33 = !((tUInt8)(DEF_a_serverAdapter_writeWithResp_wget____d29 >> 1u)) || (tUInt8)((tUInt8)1u & DEF_a_serverAdapter_writeWithResp_wget____d29); + DEF__1_CONCAT_NOT_a_serverAdapter_writeWithResp_wge_ETC___d34 = (tUInt8)3u & (((tUInt8)1u << 1u) | DEF_NOT_a_serverAdapter_writeWithResp_wget__9_BIT__ETC___d33); + INST_a_serverAdapter_s1_1.METH_wset(DEF__1_CONCAT_NOT_a_serverAdapter_writeWithResp_wge_ETC___d34); + if (DEF_NOT_a_serverAdapter_writeWithResp_wget__9_BIT__ETC___d33) + INST_a_serverAdapter_cnt_1.METH_wset((tUInt8)1u); +} + +void MOD_mkVectorDot::RL_a_serverAdapter_moveToOutFIFO() +{ + tUInt32 DEF_v__h1443; + DEF_v__h1443 = INST_a_memory.METH_read(); + DEF_a_serverAdapter_s1___d35 = INST_a_serverAdapter_s1.METH_read(); + DEF_a_serverAdapter_s1_5_BIT_0___d36 = (tUInt8)((tUInt8)1u & DEF_a_serverAdapter_s1___d35); + if (DEF_a_serverAdapter_s1_5_BIT_0___d36) + INST_a_serverAdapter_outData_enqw.METH_wset(DEF_v__h1443); + if (DEF_a_serverAdapter_s1_5_BIT_0___d36) + INST_a_serverAdapter_outData_beforeEnq.METH_write((tUInt8)1u); +} + +void MOD_mkVectorDot::RL_a_serverAdapter_overRun() +{ + if (!(PORT_RST_N == (tUInt8)0u)) + dollar_display(sim_hdl, this, "s", &__str_literal_3); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_outData_enqueue() +{ + DEF_x_wget__h1850 = INST_b_serverAdapter_outData_enqw.METH_wget(); + DEF_x__h1948 = DEF_x_wget__h1850; + INST_b_serverAdapter_outData_ff.METH_enq(DEF_x__h1948); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_outData_dequeue() +{ + INST_b_serverAdapter_outData_ff.METH_deq(); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_cnt_finalAdd() +{ + tUInt8 DEF_IF_b_serverAdapter_cnt_3_whas__3_THEN_b_server_ETC___d73; + tUInt8 DEF_b__h2348; + tUInt8 DEF_b__h2385; + tUInt8 DEF_b__h2321; + DEF_b__h2321 = INST_b_serverAdapter_cnt_3.METH_wget(); + DEF_b__h2385 = INST_b_serverAdapter_cnt_2.METH_wget(); + DEF_b__h2348 = INST_b_serverAdapter_cnt_1.METH_wget(); + DEF_b__h2341 = INST_b_serverAdapter_cnt.METH_read(); + DEF_b_serverAdapter_cnt_3_whas____d63 = INST_b_serverAdapter_cnt_3.METH_whas(); + DEF_b_serverAdapter_cnt_2_whas____d61 = INST_b_serverAdapter_cnt_2.METH_whas(); + DEF_b_serverAdapter_cnt_1_whas____d60 = INST_b_serverAdapter_cnt_1.METH_whas(); + DEF_IF_b_serverAdapter_cnt_3_whas__3_THEN_b_server_ETC___d73 = DEF_b_serverAdapter_cnt_3_whas____d63 ? DEF_b__h2321 : (tUInt8)7u & (((tUInt8)7u & (DEF_b__h2341 + (DEF_b_serverAdapter_cnt_1_whas____d60 ? DEF_b__h2348 : (tUInt8)0u))) + (DEF_b_serverAdapter_cnt_2_whas____d61 ? DEF_b__h2385 : (tUInt8)0u)); + INST_b_serverAdapter_cnt.METH_write(DEF_IF_b_serverAdapter_cnt_3_whas__3_THEN_b_server_ETC___d73); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_s1__dreg_update() +{ + tUInt8 DEF_IF_b_serverAdapter_s1_1_whas__4_THEN_b_serverA_ETC___d76; + DEF__0_CONCAT_DONTCARE___d26 = (tUInt8)0u; + DEF_IF_b_serverAdapter_s1_1_whas__4_THEN_b_serverA_ETC___d76 = INST_b_serverAdapter_s1_1.METH_whas() ? INST_b_serverAdapter_s1_1.METH_wget() : DEF__0_CONCAT_DONTCARE___d26; + INST_b_serverAdapter_s1.METH_write(DEF_IF_b_serverAdapter_s1_1_whas__4_THEN_b_serverA_ETC___d76); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_stageReadResponseAlways() +{ + tUInt8 DEF_NOT_b_serverAdapter_writeWithResp_wget__8_BIT__ETC___d82; + tUInt8 DEF__1_CONCAT_NOT_b_serverAdapter_writeWithResp_wge_ETC___d83; + tUInt8 DEF_b_serverAdapter_writeWithResp_wget____d78; + DEF_b_serverAdapter_writeWithResp_wget____d78 = INST_b_serverAdapter_writeWithResp.METH_wget(); + DEF_NOT_b_serverAdapter_writeWithResp_wget__8_BIT__ETC___d82 = !((tUInt8)(DEF_b_serverAdapter_writeWithResp_wget____d78 >> 1u)) || (tUInt8)((tUInt8)1u & DEF_b_serverAdapter_writeWithResp_wget____d78); + DEF__1_CONCAT_NOT_b_serverAdapter_writeWithResp_wge_ETC___d83 = (tUInt8)3u & (((tUInt8)1u << 1u) | DEF_NOT_b_serverAdapter_writeWithResp_wget__8_BIT__ETC___d82); + INST_b_serverAdapter_s1_1.METH_wset(DEF__1_CONCAT_NOT_b_serverAdapter_writeWithResp_wge_ETC___d83); + if (DEF_NOT_b_serverAdapter_writeWithResp_wget__8_BIT__ETC___d82) + INST_b_serverAdapter_cnt_1.METH_wset((tUInt8)1u); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_moveToOutFIFO() +{ + tUInt32 DEF_v__h2911; + DEF_v__h2911 = INST_b_memory.METH_read(); + DEF_b_serverAdapter_s1___d84 = INST_b_serverAdapter_s1.METH_read(); + DEF_b_serverAdapter_s1_4_BIT_0___d85 = (tUInt8)((tUInt8)1u & DEF_b_serverAdapter_s1___d84); + if (DEF_b_serverAdapter_s1_4_BIT_0___d85) + INST_b_serverAdapter_outData_enqw.METH_wset(DEF_v__h2911); + if (DEF_b_serverAdapter_s1_4_BIT_0___d85) + INST_b_serverAdapter_outData_beforeEnq.METH_write((tUInt8)1u); +} + +void MOD_mkVectorDot::RL_b_serverAdapter_overRun() +{ + if (!(PORT_RST_N == (tUInt8)0u)) + dollar_display(sim_hdl, this, "s", &__str_literal_3); +} + +void MOD_mkVectorDot::RL_process_a() +{ + tUInt8 DEF_x__h3525; + tUInt8 DEF_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d116; + tUInt8 DEF_NOT_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_P_ETC___d118; + tUInt8 DEF_x__h3544; + DEF_x__h3544 = INST_pos_a.METH_read(); + DEF_x__h4079 = INST_dim.METH_read(); + DEF_x__h3690 = INST_i.METH_read(); + DEF_x__h3688 = (tUInt8)255u & DEF_x__h3690; + DEF_y__h3687 = (tUInt8)255u & (DEF_x__h3688 + (tUInt8)1u); + DEF_y__h3685 = (tUInt8)((tUInt8)255u & (65535u & (((tUInt32)(DEF_x__h4079)) * ((tUInt32)(DEF_y__h3687))))); + DEF_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d116 = DEF_x__h3544 < DEF_y__h3685; + DEF_NOT_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_P_ETC___d118 = !DEF_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d116; + DEF_x__h3525 = (tUInt8)255u & (DEF_x__h3544 + (tUInt8)1u); + INST_a_memory.METH_put((tUInt8)0u, DEF_x__h3544, 2863311530u); + INST_a_serverAdapter_writeWithResp.METH_wset((tUInt8)0u); + if (DEF_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d116) + INST_pos_a.METH_write(DEF_x__h3525); + INST_req_a_ready.METH_write((tUInt8)1u); + if (DEF_NOT_pos_a_09_ULT_dim_10_MUL_0_CONCAT_i_11_12_P_ETC___d118) + INST_done_a.METH_write((tUInt8)1u); +} + +void MOD_mkVectorDot::RL_process_b() +{ + tUInt8 DEF_x__h3711; + tUInt8 DEF_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d128; + tUInt8 DEF_NOT_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_P_ETC___d130; + tUInt8 DEF_x__h3730; + DEF_x__h3730 = INST_pos_b.METH_read(); + DEF_x__h4079 = INST_dim.METH_read(); + DEF_x__h3690 = INST_i.METH_read(); + DEF_x__h3688 = (tUInt8)255u & DEF_x__h3690; + DEF_y__h3687 = (tUInt8)255u & (DEF_x__h3688 + (tUInt8)1u); + DEF_y__h3685 = (tUInt8)((tUInt8)255u & (65535u & (((tUInt32)(DEF_x__h4079)) * ((tUInt32)(DEF_y__h3687))))); + DEF_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d128 = DEF_x__h3730 < DEF_y__h3685; + DEF_NOT_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_P_ETC___d130 = !DEF_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d128; + DEF_x__h3711 = (tUInt8)255u & (DEF_x__h3730 + (tUInt8)1u); + INST_b_memory.METH_put((tUInt8)0u, DEF_x__h3730, 2863311530u); + INST_b_serverAdapter_writeWithResp.METH_wset((tUInt8)0u); + if (DEF_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_PLUS__ETC___d128) + INST_pos_b.METH_write(DEF_x__h3711); + INST_req_b_ready.METH_write((tUInt8)1u); + if (DEF_NOT_pos_b_27_ULT_dim_10_MUL_0_CONCAT_i_11_12_P_ETC___d130) + INST_done_b.METH_write((tUInt8)1u); +} + +void MOD_mkVectorDot::RL_mult_inputs() +{ + tUInt8 DEF_x__h4044; + tUInt32 DEF_x__h3993; + tUInt8 DEF_pos_out_50_EQ_dim_10_MINUS_1_52___d153; + tUInt32 DEF_v__h3785; + tUInt32 DEF_v__h3885; + tUInt32 DEF_y__h4028; + tUInt8 DEF_x__h4063; + tUInt32 DEF_x_first__h259; + tUInt32 DEF_x_first__h1735; + DEF_x_wget__h1850 = INST_b_serverAdapter_outData_enqw.METH_wget(); + DEF_x_first__h1735 = INST_b_serverAdapter_outData_ff.METH_first(); + DEF_x_wget__h374 = INST_a_serverAdapter_outData_enqw.METH_wget(); + DEF_x_first__h259 = INST_a_serverAdapter_outData_ff.METH_first(); + DEF_x__h4027 = INST_output_res.METH_read(); + DEF_x__h4063 = INST_pos_out.METH_read(); + DEF_x__h4079 = INST_dim.METH_read(); + DEF_b_serverAdapter_outData_ff_i_notEmpty____d54 = INST_b_serverAdapter_outData_ff.METH_i_notEmpty(); + DEF_a_serverAdapter_outData_ff_i_notEmpty____d4 = INST_a_serverAdapter_outData_ff.METH_i_notEmpty(); + DEF_x__h1948 = DEF_x_wget__h1850; + DEF_v__h3885 = DEF_b_serverAdapter_outData_ff_i_notEmpty____d54 ? DEF_x_first__h1735 : DEF_x__h1948; + DEF_x__h472 = DEF_x_wget__h374; + DEF_v__h3785 = DEF_a_serverAdapter_outData_ff_i_notEmpty____d4 ? DEF_x_first__h259 : DEF_x__h472; + DEF_y__h4028 = (tUInt32)(((tUInt64)(DEF_v__h3785)) * ((tUInt64)(DEF_v__h3885))); + DEF_pos_out_50_EQ_dim_10_MINUS_1_52___d153 = DEF_x__h4063 == ((tUInt8)255u & (DEF_x__h4079 - (tUInt8)1u)); + DEF_x__h3993 = DEF_x__h4027 + DEF_y__h4028; + DEF_x__h4044 = (tUInt8)255u & (DEF_x__h4063 + (tUInt8)1u); + INST_a_serverAdapter_outData_dequeueing.METH_wset(); + INST_a_serverAdapter_outData_beforeDeq.METH_write((tUInt8)1u); + INST_a_serverAdapter_cnt_2.METH_wset((tUInt8)7u); + INST_b_serverAdapter_outData_beforeDeq.METH_write((tUInt8)1u); + INST_b_serverAdapter_outData_dequeueing.METH_wset(); + INST_b_serverAdapter_cnt_2.METH_wset((tUInt8)7u); + INST_output_res.METH_write(DEF_x__h3993); + INST_pos_out.METH_write(DEF_x__h4044); + if (DEF_pos_out_50_EQ_dim_10_MINUS_1_52___d153) + INST_done_all.METH_write((tUInt8)1u); + if (DEF_pos_out_50_EQ_dim_10_MINUS_1_52___d153) + INST_ready_start.METH_write((tUInt8)0u); + INST_req_b_ready.METH_write((tUInt8)0u); + INST_req_a_ready.METH_write((tUInt8)0u); +} + + +/* Methods */ + +void MOD_mkVectorDot::METH_start(tUInt8 ARG_start_dim_in, tUInt8 ARG_start_i) +{ + tUInt8 DEF_y__h4506; + tUInt8 DEF_x__h4487; + DEF_y__h4506 = (tUInt8)255u & ARG_start_i; + DEF_x__h4487 = (tUInt8)((tUInt8)255u & (65535u & (((tUInt32)(ARG_start_dim_in)) * ((tUInt32)(DEF_y__h4506))))); + INST_ready_start.METH_write((tUInt8)1u); + INST_dim.METH_write(ARG_start_dim_in); + INST_done_a.METH_write((tUInt8)0u); + INST_i.METH_write(ARG_start_i); + INST_done_b.METH_write((tUInt8)0u); + INST_done_all.METH_write((tUInt8)0u); + INST_pos_a.METH_write(DEF_x__h4487); + INST_pos_b.METH_write(DEF_x__h4487); + INST_output_res.METH_write(0u); + INST_pos_out.METH_write((tUInt8)0u); +} + +tUInt8 MOD_mkVectorDot::METH_RDY_start() +{ + tUInt8 DEF_CAN_FIRE_start; + tUInt8 PORT_RDY_start; + DEF_ready_start__h3375 = INST_ready_start.METH_read(); + DEF_CAN_FIRE_start = !DEF_ready_start__h3375; + PORT_RDY_start = DEF_CAN_FIRE_start; + return PORT_RDY_start; +} + +tUInt32 MOD_mkVectorDot::METH_response() +{ + tUInt32 PORT_response; + DEF_x__h4027 = INST_output_res.METH_read(); + PORT_response = DEF_x__h4027; + return PORT_response; +} + +tUInt8 MOD_mkVectorDot::METH_RDY_response() +{ + tUInt8 DEF_CAN_FIRE_response; + tUInt8 PORT_RDY_response; + DEF_done_all__h3778 = INST_done_all.METH_read(); + DEF_CAN_FIRE_response = DEF_done_all__h3778; + PORT_RDY_response = DEF_CAN_FIRE_response; + return PORT_RDY_response; +} + + +/* Reset routines */ + +void MOD_mkVectorDot::reset_RST_N(tUInt8 ARG_rst_in) +{ + PORT_RST_N = ARG_rst_in; + INST_req_b_ready.reset_RST(ARG_rst_in); + INST_req_a_ready.reset_RST(ARG_rst_in); + INST_ready_start.reset_RST(ARG_rst_in); + INST_pos_out.reset_RST(ARG_rst_in); + INST_pos_b.reset_RST(ARG_rst_in); + INST_pos_a.reset_RST(ARG_rst_in); + INST_output_res.reset_RST(ARG_rst_in); + INST_i.reset_RST(ARG_rst_in); + INST_done_b.reset_RST(ARG_rst_in); + INST_done_all.reset_RST(ARG_rst_in); + INST_done_a.reset_RST(ARG_rst_in); + INST_dim.reset_RST(ARG_rst_in); + INST_b_serverAdapter_s1.reset_RST(ARG_rst_in); + INST_b_serverAdapter_outData_ff.reset_RST(ARG_rst_in); + INST_b_serverAdapter_cnt.reset_RST(ARG_rst_in); + INST_a_serverAdapter_s1.reset_RST(ARG_rst_in); + INST_a_serverAdapter_outData_ff.reset_RST(ARG_rst_in); + INST_a_serverAdapter_cnt.reset_RST(ARG_rst_in); +} + + +/* Static handles to reset routines */ + + +/* Functions for the parent module to register its reset fns */ + + +/* Functions to set the elaborated clock id */ + +void MOD_mkVectorDot::set_clk_0(char const *s) +{ + __clk_handle_0 = bk_get_or_define_clock(sim_hdl, s); +} + + +/* State dumping routine */ +void MOD_mkVectorDot::dump_state(unsigned int indent) +{ + printf("%*s%s:\n", indent, "", inst_name); + INST_a_memory.dump_state(indent + 2u); + INST_a_serverAdapter_cnt.dump_state(indent + 2u); + INST_a_serverAdapter_cnt_1.dump_state(indent + 2u); + INST_a_serverAdapter_cnt_2.dump_state(indent + 2u); + INST_a_serverAdapter_cnt_3.dump_state(indent + 2u); + INST_a_serverAdapter_outData_beforeDeq.dump_state(indent + 2u); + INST_a_serverAdapter_outData_beforeEnq.dump_state(indent + 2u); + INST_a_serverAdapter_outData_dequeueing.dump_state(indent + 2u); + INST_a_serverAdapter_outData_enqw.dump_state(indent + 2u); + INST_a_serverAdapter_outData_ff.dump_state(indent + 2u); + INST_a_serverAdapter_s1.dump_state(indent + 2u); + INST_a_serverAdapter_s1_1.dump_state(indent + 2u); + INST_a_serverAdapter_writeWithResp.dump_state(indent + 2u); + INST_b_memory.dump_state(indent + 2u); + INST_b_serverAdapter_cnt.dump_state(indent + 2u); + INST_b_serverAdapter_cnt_1.dump_state(indent + 2u); + INST_b_serverAdapter_cnt_2.dump_state(indent + 2u); + INST_b_serverAdapter_cnt_3.dump_state(indent + 2u); + INST_b_serverAdapter_outData_beforeDeq.dump_state(indent + 2u); + INST_b_serverAdapter_outData_beforeEnq.dump_state(indent + 2u); + INST_b_serverAdapter_outData_dequeueing.dump_state(indent + 2u); + INST_b_serverAdapter_outData_enqw.dump_state(indent + 2u); + INST_b_serverAdapter_outData_ff.dump_state(indent + 2u); + INST_b_serverAdapter_s1.dump_state(indent + 2u); + INST_b_serverAdapter_s1_1.dump_state(indent + 2u); + INST_b_serverAdapter_writeWithResp.dump_state(indent + 2u); + INST_dim.dump_state(indent + 2u); + INST_done_a.dump_state(indent + 2u); + INST_done_all.dump_state(indent + 2u); + INST_done_b.dump_state(indent + 2u); + INST_i.dump_state(indent + 2u); + INST_output_res.dump_state(indent + 2u); + INST_pos_a.dump_state(indent + 2u); + INST_pos_b.dump_state(indent + 2u); + INST_pos_out.dump_state(indent + 2u); + INST_ready_start.dump_state(indent + 2u); + INST_req_a_ready.dump_state(indent + 2u); + INST_req_b_ready.dump_state(indent + 2u); +} + + +/* VCD dumping routines */ + +unsigned int MOD_mkVectorDot::dump_VCD_defs(unsigned int levels) +{ + vcd_write_scope_start(sim_hdl, inst_name); + vcd_num = vcd_reserve_ids(sim_hdl, 66u); + unsigned int num = vcd_num; + for (unsigned int clk = 0u; clk < bk_num_clocks(sim_hdl); ++clk) + vcd_add_clock_def(sim_hdl, this, bk_clock_name(sim_hdl, clk), bk_clock_vcd_num(sim_hdl, clk)); + vcd_write_def(sim_hdl, bk_clock_vcd_num(sim_hdl, __clk_handle_0), "CLK", 1u); + vcd_write_def(sim_hdl, num++, "RST_N", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "_0_CONCAT_DONTCARE___d26", 2u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "a_serverAdapter_cnt_1_whas____d10", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "a_serverAdapter_cnt_2_whas____d11", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "a_serverAdapter_cnt_3_whas____d13", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "a_serverAdapter_outData_ff_i_notEmpty____d4", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "a_serverAdapter_s1_5_BIT_0___d36", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "a_serverAdapter_s1___d35", 2u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b__h2341", 3u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b__h868", 3u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b_serverAdapter_cnt_1_whas____d60", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b_serverAdapter_cnt_2_whas____d61", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b_serverAdapter_cnt_3_whas____d63", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b_serverAdapter_outData_ff_i_notEmpty____d54", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b_serverAdapter_s1_4_BIT_0___d85", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "b_serverAdapter_s1___d84", 2u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "done_all__h3778", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "ready_start__h3375", 1u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x__h1948", 32u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x__h3688", 8u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x__h3690", 2u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x__h4027", 32u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x__h4079", 8u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x__h472", 32u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x_wget__h1850", 32u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "x_wget__h374", 32u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "y__h3685", 8u); + vcd_set_clock(sim_hdl, num, __clk_handle_0); + vcd_write_def(sim_hdl, num++, "y__h3687", 8u); + num = INST_a_memory.dump_VCD_defs(num); + num = INST_a_serverAdapter_cnt.dump_VCD_defs(num); + num = INST_a_serverAdapter_cnt_1.dump_VCD_defs(num); + num = INST_a_serverAdapter_cnt_2.dump_VCD_defs(num); + num = INST_a_serverAdapter_cnt_3.dump_VCD_defs(num); + num = INST_a_serverAdapter_outData_beforeDeq.dump_VCD_defs(num); + num = INST_a_serverAdapter_outData_beforeEnq.dump_VCD_defs(num); + num = INST_a_serverAdapter_outData_dequeueing.dump_VCD_defs(num); + num = INST_a_serverAdapter_outData_enqw.dump_VCD_defs(num); + num = INST_a_serverAdapter_outData_ff.dump_VCD_defs(num); + num = INST_a_serverAdapter_s1.dump_VCD_defs(num); + num = INST_a_serverAdapter_s1_1.dump_VCD_defs(num); + num = INST_a_serverAdapter_writeWithResp.dump_VCD_defs(num); + num = INST_b_memory.dump_VCD_defs(num); + num = INST_b_serverAdapter_cnt.dump_VCD_defs(num); + num = INST_b_serverAdapter_cnt_1.dump_VCD_defs(num); + num = INST_b_serverAdapter_cnt_2.dump_VCD_defs(num); + num = INST_b_serverAdapter_cnt_3.dump_VCD_defs(num); + num = INST_b_serverAdapter_outData_beforeDeq.dump_VCD_defs(num); + num = INST_b_serverAdapter_outData_beforeEnq.dump_VCD_defs(num); + num = INST_b_serverAdapter_outData_dequeueing.dump_VCD_defs(num); + num = INST_b_serverAdapter_outData_enqw.dump_VCD_defs(num); + num = INST_b_serverAdapter_outData_ff.dump_VCD_defs(num); + num = INST_b_serverAdapter_s1.dump_VCD_defs(num); + num = INST_b_serverAdapter_s1_1.dump_VCD_defs(num); + num = INST_b_serverAdapter_writeWithResp.dump_VCD_defs(num); + num = INST_dim.dump_VCD_defs(num); + num = INST_done_a.dump_VCD_defs(num); + num = INST_done_all.dump_VCD_defs(num); + num = INST_done_b.dump_VCD_defs(num); + num = INST_i.dump_VCD_defs(num); + num = INST_output_res.dump_VCD_defs(num); + num = INST_pos_a.dump_VCD_defs(num); + num = INST_pos_b.dump_VCD_defs(num); + num = INST_pos_out.dump_VCD_defs(num); + num = INST_ready_start.dump_VCD_defs(num); + num = INST_req_a_ready.dump_VCD_defs(num); + num = INST_req_b_ready.dump_VCD_defs(num); + vcd_write_scope_end(sim_hdl); + return num; +} + +void MOD_mkVectorDot::dump_VCD(tVCDDumpType dt, unsigned int levels, MOD_mkVectorDot &backing) +{ + vcd_defs(dt, backing); + vcd_prims(dt, backing); +} + +void MOD_mkVectorDot::vcd_defs(tVCDDumpType dt, MOD_mkVectorDot &backing) +{ + unsigned int num = vcd_num; + if (dt == VCD_DUMP_XS) + { + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 2u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 2u); + vcd_write_x(sim_hdl, num++, 3u); + vcd_write_x(sim_hdl, num++, 3u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 2u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 1u); + vcd_write_x(sim_hdl, num++, 32u); + vcd_write_x(sim_hdl, num++, 8u); + vcd_write_x(sim_hdl, num++, 2u); + vcd_write_x(sim_hdl, num++, 32u); + vcd_write_x(sim_hdl, num++, 8u); + vcd_write_x(sim_hdl, num++, 32u); + vcd_write_x(sim_hdl, num++, 32u); + vcd_write_x(sim_hdl, num++, 32u); + vcd_write_x(sim_hdl, num++, 8u); + vcd_write_x(sim_hdl, num++, 8u); + } + else + if (dt == VCD_DUMP_CHANGES) + { + if ((backing.PORT_RST_N) != PORT_RST_N) + { + vcd_write_val(sim_hdl, num, PORT_RST_N, 1u); + backing.PORT_RST_N = PORT_RST_N; + } + ++num; + if ((backing.DEF__0_CONCAT_DONTCARE___d26) != DEF__0_CONCAT_DONTCARE___d26) + { + vcd_write_val(sim_hdl, num, DEF__0_CONCAT_DONTCARE___d26, 2u); + backing.DEF__0_CONCAT_DONTCARE___d26 = DEF__0_CONCAT_DONTCARE___d26; + } + ++num; + if ((backing.DEF_a_serverAdapter_cnt_1_whas____d10) != DEF_a_serverAdapter_cnt_1_whas____d10) + { + vcd_write_val(sim_hdl, num, DEF_a_serverAdapter_cnt_1_whas____d10, 1u); + backing.DEF_a_serverAdapter_cnt_1_whas____d10 = DEF_a_serverAdapter_cnt_1_whas____d10; + } + ++num; + if ((backing.DEF_a_serverAdapter_cnt_2_whas____d11) != DEF_a_serverAdapter_cnt_2_whas____d11) + { + vcd_write_val(sim_hdl, num, DEF_a_serverAdapter_cnt_2_whas____d11, 1u); + backing.DEF_a_serverAdapter_cnt_2_whas____d11 = DEF_a_serverAdapter_cnt_2_whas____d11; + } + ++num; + if ((backing.DEF_a_serverAdapter_cnt_3_whas____d13) != DEF_a_serverAdapter_cnt_3_whas____d13) + { + vcd_write_val(sim_hdl, num, DEF_a_serverAdapter_cnt_3_whas____d13, 1u); + backing.DEF_a_serverAdapter_cnt_3_whas____d13 = DEF_a_serverAdapter_cnt_3_whas____d13; + } + ++num; + if ((backing.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4) != DEF_a_serverAdapter_outData_ff_i_notEmpty____d4) + { + vcd_write_val(sim_hdl, num, DEF_a_serverAdapter_outData_ff_i_notEmpty____d4, 1u); + backing.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4 = DEF_a_serverAdapter_outData_ff_i_notEmpty____d4; + } + ++num; + if ((backing.DEF_a_serverAdapter_s1_5_BIT_0___d36) != DEF_a_serverAdapter_s1_5_BIT_0___d36) + { + vcd_write_val(sim_hdl, num, DEF_a_serverAdapter_s1_5_BIT_0___d36, 1u); + backing.DEF_a_serverAdapter_s1_5_BIT_0___d36 = DEF_a_serverAdapter_s1_5_BIT_0___d36; + } + ++num; + if ((backing.DEF_a_serverAdapter_s1___d35) != DEF_a_serverAdapter_s1___d35) + { + vcd_write_val(sim_hdl, num, DEF_a_serverAdapter_s1___d35, 2u); + backing.DEF_a_serverAdapter_s1___d35 = DEF_a_serverAdapter_s1___d35; + } + ++num; + if ((backing.DEF_b__h2341) != DEF_b__h2341) + { + vcd_write_val(sim_hdl, num, DEF_b__h2341, 3u); + backing.DEF_b__h2341 = DEF_b__h2341; + } + ++num; + if ((backing.DEF_b__h868) != DEF_b__h868) + { + vcd_write_val(sim_hdl, num, DEF_b__h868, 3u); + backing.DEF_b__h868 = DEF_b__h868; + } + ++num; + if ((backing.DEF_b_serverAdapter_cnt_1_whas____d60) != DEF_b_serverAdapter_cnt_1_whas____d60) + { + vcd_write_val(sim_hdl, num, DEF_b_serverAdapter_cnt_1_whas____d60, 1u); + backing.DEF_b_serverAdapter_cnt_1_whas____d60 = DEF_b_serverAdapter_cnt_1_whas____d60; + } + ++num; + if ((backing.DEF_b_serverAdapter_cnt_2_whas____d61) != DEF_b_serverAdapter_cnt_2_whas____d61) + { + vcd_write_val(sim_hdl, num, DEF_b_serverAdapter_cnt_2_whas____d61, 1u); + backing.DEF_b_serverAdapter_cnt_2_whas____d61 = DEF_b_serverAdapter_cnt_2_whas____d61; + } + ++num; + if ((backing.DEF_b_serverAdapter_cnt_3_whas____d63) != DEF_b_serverAdapter_cnt_3_whas____d63) + { + vcd_write_val(sim_hdl, num, DEF_b_serverAdapter_cnt_3_whas____d63, 1u); + backing.DEF_b_serverAdapter_cnt_3_whas____d63 = DEF_b_serverAdapter_cnt_3_whas____d63; + } + ++num; + if ((backing.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54) != DEF_b_serverAdapter_outData_ff_i_notEmpty____d54) + { + vcd_write_val(sim_hdl, num, DEF_b_serverAdapter_outData_ff_i_notEmpty____d54, 1u); + backing.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54 = DEF_b_serverAdapter_outData_ff_i_notEmpty____d54; + } + ++num; + if ((backing.DEF_b_serverAdapter_s1_4_BIT_0___d85) != DEF_b_serverAdapter_s1_4_BIT_0___d85) + { + vcd_write_val(sim_hdl, num, DEF_b_serverAdapter_s1_4_BIT_0___d85, 1u); + backing.DEF_b_serverAdapter_s1_4_BIT_0___d85 = DEF_b_serverAdapter_s1_4_BIT_0___d85; + } + ++num; + if ((backing.DEF_b_serverAdapter_s1___d84) != DEF_b_serverAdapter_s1___d84) + { + vcd_write_val(sim_hdl, num, DEF_b_serverAdapter_s1___d84, 2u); + backing.DEF_b_serverAdapter_s1___d84 = DEF_b_serverAdapter_s1___d84; + } + ++num; + if ((backing.DEF_done_all__h3778) != DEF_done_all__h3778) + { + vcd_write_val(sim_hdl, num, DEF_done_all__h3778, 1u); + backing.DEF_done_all__h3778 = DEF_done_all__h3778; + } + ++num; + if ((backing.DEF_ready_start__h3375) != DEF_ready_start__h3375) + { + vcd_write_val(sim_hdl, num, DEF_ready_start__h3375, 1u); + backing.DEF_ready_start__h3375 = DEF_ready_start__h3375; + } + ++num; + if ((backing.DEF_x__h1948) != DEF_x__h1948) + { + vcd_write_val(sim_hdl, num, DEF_x__h1948, 32u); + backing.DEF_x__h1948 = DEF_x__h1948; + } + ++num; + if ((backing.DEF_x__h3688) != DEF_x__h3688) + { + vcd_write_val(sim_hdl, num, DEF_x__h3688, 8u); + backing.DEF_x__h3688 = DEF_x__h3688; + } + ++num; + if ((backing.DEF_x__h3690) != DEF_x__h3690) + { + vcd_write_val(sim_hdl, num, DEF_x__h3690, 2u); + backing.DEF_x__h3690 = DEF_x__h3690; + } + ++num; + if ((backing.DEF_x__h4027) != DEF_x__h4027) + { + vcd_write_val(sim_hdl, num, DEF_x__h4027, 32u); + backing.DEF_x__h4027 = DEF_x__h4027; + } + ++num; + if ((backing.DEF_x__h4079) != DEF_x__h4079) + { + vcd_write_val(sim_hdl, num, DEF_x__h4079, 8u); + backing.DEF_x__h4079 = DEF_x__h4079; + } + ++num; + if ((backing.DEF_x__h472) != DEF_x__h472) + { + vcd_write_val(sim_hdl, num, DEF_x__h472, 32u); + backing.DEF_x__h472 = DEF_x__h472; + } + ++num; + if ((backing.DEF_x_wget__h1850) != DEF_x_wget__h1850) + { + vcd_write_val(sim_hdl, num, DEF_x_wget__h1850, 32u); + backing.DEF_x_wget__h1850 = DEF_x_wget__h1850; + } + ++num; + if ((backing.DEF_x_wget__h374) != DEF_x_wget__h374) + { + vcd_write_val(sim_hdl, num, DEF_x_wget__h374, 32u); + backing.DEF_x_wget__h374 = DEF_x_wget__h374; + } + ++num; + if ((backing.DEF_y__h3685) != DEF_y__h3685) + { + vcd_write_val(sim_hdl, num, DEF_y__h3685, 8u); + backing.DEF_y__h3685 = DEF_y__h3685; + } + ++num; + if ((backing.DEF_y__h3687) != DEF_y__h3687) + { + vcd_write_val(sim_hdl, num, DEF_y__h3687, 8u); + backing.DEF_y__h3687 = DEF_y__h3687; + } + ++num; + } + else + { + vcd_write_val(sim_hdl, num++, PORT_RST_N, 1u); + backing.PORT_RST_N = PORT_RST_N; + vcd_write_val(sim_hdl, num++, DEF__0_CONCAT_DONTCARE___d26, 2u); + backing.DEF__0_CONCAT_DONTCARE___d26 = DEF__0_CONCAT_DONTCARE___d26; + vcd_write_val(sim_hdl, num++, DEF_a_serverAdapter_cnt_1_whas____d10, 1u); + backing.DEF_a_serverAdapter_cnt_1_whas____d10 = DEF_a_serverAdapter_cnt_1_whas____d10; + vcd_write_val(sim_hdl, num++, DEF_a_serverAdapter_cnt_2_whas____d11, 1u); + backing.DEF_a_serverAdapter_cnt_2_whas____d11 = DEF_a_serverAdapter_cnt_2_whas____d11; + vcd_write_val(sim_hdl, num++, DEF_a_serverAdapter_cnt_3_whas____d13, 1u); + backing.DEF_a_serverAdapter_cnt_3_whas____d13 = DEF_a_serverAdapter_cnt_3_whas____d13; + vcd_write_val(sim_hdl, num++, DEF_a_serverAdapter_outData_ff_i_notEmpty____d4, 1u); + backing.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4 = DEF_a_serverAdapter_outData_ff_i_notEmpty____d4; + vcd_write_val(sim_hdl, num++, DEF_a_serverAdapter_s1_5_BIT_0___d36, 1u); + backing.DEF_a_serverAdapter_s1_5_BIT_0___d36 = DEF_a_serverAdapter_s1_5_BIT_0___d36; + vcd_write_val(sim_hdl, num++, DEF_a_serverAdapter_s1___d35, 2u); + backing.DEF_a_serverAdapter_s1___d35 = DEF_a_serverAdapter_s1___d35; + vcd_write_val(sim_hdl, num++, DEF_b__h2341, 3u); + backing.DEF_b__h2341 = DEF_b__h2341; + vcd_write_val(sim_hdl, num++, DEF_b__h868, 3u); + backing.DEF_b__h868 = DEF_b__h868; + vcd_write_val(sim_hdl, num++, DEF_b_serverAdapter_cnt_1_whas____d60, 1u); + backing.DEF_b_serverAdapter_cnt_1_whas____d60 = DEF_b_serverAdapter_cnt_1_whas____d60; + vcd_write_val(sim_hdl, num++, DEF_b_serverAdapter_cnt_2_whas____d61, 1u); + backing.DEF_b_serverAdapter_cnt_2_whas____d61 = DEF_b_serverAdapter_cnt_2_whas____d61; + vcd_write_val(sim_hdl, num++, DEF_b_serverAdapter_cnt_3_whas____d63, 1u); + backing.DEF_b_serverAdapter_cnt_3_whas____d63 = DEF_b_serverAdapter_cnt_3_whas____d63; + vcd_write_val(sim_hdl, num++, DEF_b_serverAdapter_outData_ff_i_notEmpty____d54, 1u); + backing.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54 = DEF_b_serverAdapter_outData_ff_i_notEmpty____d54; + vcd_write_val(sim_hdl, num++, DEF_b_serverAdapter_s1_4_BIT_0___d85, 1u); + backing.DEF_b_serverAdapter_s1_4_BIT_0___d85 = DEF_b_serverAdapter_s1_4_BIT_0___d85; + vcd_write_val(sim_hdl, num++, DEF_b_serverAdapter_s1___d84, 2u); + backing.DEF_b_serverAdapter_s1___d84 = DEF_b_serverAdapter_s1___d84; + vcd_write_val(sim_hdl, num++, DEF_done_all__h3778, 1u); + backing.DEF_done_all__h3778 = DEF_done_all__h3778; + vcd_write_val(sim_hdl, num++, DEF_ready_start__h3375, 1u); + backing.DEF_ready_start__h3375 = DEF_ready_start__h3375; + vcd_write_val(sim_hdl, num++, DEF_x__h1948, 32u); + backing.DEF_x__h1948 = DEF_x__h1948; + vcd_write_val(sim_hdl, num++, DEF_x__h3688, 8u); + backing.DEF_x__h3688 = DEF_x__h3688; + vcd_write_val(sim_hdl, num++, DEF_x__h3690, 2u); + backing.DEF_x__h3690 = DEF_x__h3690; + vcd_write_val(sim_hdl, num++, DEF_x__h4027, 32u); + backing.DEF_x__h4027 = DEF_x__h4027; + vcd_write_val(sim_hdl, num++, DEF_x__h4079, 8u); + backing.DEF_x__h4079 = DEF_x__h4079; + vcd_write_val(sim_hdl, num++, DEF_x__h472, 32u); + backing.DEF_x__h472 = DEF_x__h472; + vcd_write_val(sim_hdl, num++, DEF_x_wget__h1850, 32u); + backing.DEF_x_wget__h1850 = DEF_x_wget__h1850; + vcd_write_val(sim_hdl, num++, DEF_x_wget__h374, 32u); + backing.DEF_x_wget__h374 = DEF_x_wget__h374; + vcd_write_val(sim_hdl, num++, DEF_y__h3685, 8u); + backing.DEF_y__h3685 = DEF_y__h3685; + vcd_write_val(sim_hdl, num++, DEF_y__h3687, 8u); + backing.DEF_y__h3687 = DEF_y__h3687; + } +} + +void MOD_mkVectorDot::vcd_prims(tVCDDumpType dt, MOD_mkVectorDot &backing) +{ + INST_a_memory.dump_VCD(dt, backing.INST_a_memory); + INST_a_serverAdapter_cnt.dump_VCD(dt, backing.INST_a_serverAdapter_cnt); + INST_a_serverAdapter_cnt_1.dump_VCD(dt, backing.INST_a_serverAdapter_cnt_1); + INST_a_serverAdapter_cnt_2.dump_VCD(dt, backing.INST_a_serverAdapter_cnt_2); + INST_a_serverAdapter_cnt_3.dump_VCD(dt, backing.INST_a_serverAdapter_cnt_3); + INST_a_serverAdapter_outData_beforeDeq.dump_VCD(dt, backing.INST_a_serverAdapter_outData_beforeDeq); + INST_a_serverAdapter_outData_beforeEnq.dump_VCD(dt, backing.INST_a_serverAdapter_outData_beforeEnq); + INST_a_serverAdapter_outData_dequeueing.dump_VCD(dt, + backing.INST_a_serverAdapter_outData_dequeueing); + INST_a_serverAdapter_outData_enqw.dump_VCD(dt, backing.INST_a_serverAdapter_outData_enqw); + INST_a_serverAdapter_outData_ff.dump_VCD(dt, backing.INST_a_serverAdapter_outData_ff); + INST_a_serverAdapter_s1.dump_VCD(dt, backing.INST_a_serverAdapter_s1); + INST_a_serverAdapter_s1_1.dump_VCD(dt, backing.INST_a_serverAdapter_s1_1); + INST_a_serverAdapter_writeWithResp.dump_VCD(dt, backing.INST_a_serverAdapter_writeWithResp); + INST_b_memory.dump_VCD(dt, backing.INST_b_memory); + INST_b_serverAdapter_cnt.dump_VCD(dt, backing.INST_b_serverAdapter_cnt); + INST_b_serverAdapter_cnt_1.dump_VCD(dt, backing.INST_b_serverAdapter_cnt_1); + INST_b_serverAdapter_cnt_2.dump_VCD(dt, backing.INST_b_serverAdapter_cnt_2); + INST_b_serverAdapter_cnt_3.dump_VCD(dt, backing.INST_b_serverAdapter_cnt_3); + INST_b_serverAdapter_outData_beforeDeq.dump_VCD(dt, backing.INST_b_serverAdapter_outData_beforeDeq); + INST_b_serverAdapter_outData_beforeEnq.dump_VCD(dt, backing.INST_b_serverAdapter_outData_beforeEnq); + INST_b_serverAdapter_outData_dequeueing.dump_VCD(dt, + backing.INST_b_serverAdapter_outData_dequeueing); + INST_b_serverAdapter_outData_enqw.dump_VCD(dt, backing.INST_b_serverAdapter_outData_enqw); + INST_b_serverAdapter_outData_ff.dump_VCD(dt, backing.INST_b_serverAdapter_outData_ff); + INST_b_serverAdapter_s1.dump_VCD(dt, backing.INST_b_serverAdapter_s1); + INST_b_serverAdapter_s1_1.dump_VCD(dt, backing.INST_b_serverAdapter_s1_1); + INST_b_serverAdapter_writeWithResp.dump_VCD(dt, backing.INST_b_serverAdapter_writeWithResp); + INST_dim.dump_VCD(dt, backing.INST_dim); + INST_done_a.dump_VCD(dt, backing.INST_done_a); + INST_done_all.dump_VCD(dt, backing.INST_done_all); + INST_done_b.dump_VCD(dt, backing.INST_done_b); + INST_i.dump_VCD(dt, backing.INST_i); + INST_output_res.dump_VCD(dt, backing.INST_output_res); + INST_pos_a.dump_VCD(dt, backing.INST_pos_a); + INST_pos_b.dump_VCD(dt, backing.INST_pos_b); + INST_pos_out.dump_VCD(dt, backing.INST_pos_out); + INST_ready_start.dump_VCD(dt, backing.INST_ready_start); + INST_req_a_ready.dump_VCD(dt, backing.INST_req_a_ready); + INST_req_b_ready.dump_VCD(dt, backing.INST_req_b_ready); +} diff --git a/part_2_vector_multiply/build/mkVectorDot.h b/part_2_vector_multiply/build/mkVectorDot.h new file mode 100644 index 0000000..a2cb8b0 --- /dev/null +++ b/part_2_vector_multiply/build/mkVectorDot.h @@ -0,0 +1,177 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:09 CET 2024 + * + */ + +/* Generation options: */ +#ifndef __mkVectorDot_h__ +#define __mkVectorDot_h__ + +#include "bluesim_types.h" +#include "bs_module.h" +#include "bluesim_primitives.h" +#include "bs_vcd.h" + + +/* Class declaration for the mkVectorDot module */ +class MOD_mkVectorDot : public Module { + + /* Clock handles */ + private: + tClock __clk_handle_0; + + /* Clock gate handles */ + public: + tUInt8 *clk_gate[0]; + + /* Instantiation parameters */ + public: + + /* Module state */ + public: + MOD_BRAM INST_a_memory; + MOD_Reg INST_a_serverAdapter_cnt; + MOD_Wire INST_a_serverAdapter_cnt_1; + MOD_Wire INST_a_serverAdapter_cnt_2; + MOD_Wire INST_a_serverAdapter_cnt_3; + MOD_Reg INST_a_serverAdapter_outData_beforeDeq; + MOD_Reg INST_a_serverAdapter_outData_beforeEnq; + MOD_Wire INST_a_serverAdapter_outData_dequeueing; + MOD_Wire INST_a_serverAdapter_outData_enqw; + MOD_Fifo INST_a_serverAdapter_outData_ff; + MOD_Reg INST_a_serverAdapter_s1; + MOD_Wire INST_a_serverAdapter_s1_1; + MOD_Wire INST_a_serverAdapter_writeWithResp; + MOD_BRAM INST_b_memory; + MOD_Reg INST_b_serverAdapter_cnt; + MOD_Wire INST_b_serverAdapter_cnt_1; + MOD_Wire INST_b_serverAdapter_cnt_2; + MOD_Wire INST_b_serverAdapter_cnt_3; + MOD_Reg INST_b_serverAdapter_outData_beforeDeq; + MOD_Reg INST_b_serverAdapter_outData_beforeEnq; + MOD_Wire INST_b_serverAdapter_outData_dequeueing; + MOD_Wire INST_b_serverAdapter_outData_enqw; + MOD_Fifo INST_b_serverAdapter_outData_ff; + MOD_Reg INST_b_serverAdapter_s1; + MOD_Wire INST_b_serverAdapter_s1_1; + MOD_Wire INST_b_serverAdapter_writeWithResp; + MOD_Reg INST_dim; + MOD_Reg INST_done_a; + MOD_Reg INST_done_all; + MOD_Reg INST_done_b; + MOD_Reg INST_i; + MOD_Reg INST_output_res; + MOD_Reg INST_pos_a; + MOD_Reg INST_pos_b; + MOD_Reg INST_pos_out; + MOD_Reg INST_ready_start; + MOD_Reg INST_req_a_ready; + MOD_Reg INST_req_b_ready; + + /* Constructor */ + public: + MOD_mkVectorDot(tSimStateHdl simHdl, char const *name, Module *parent); + + /* Symbol init methods */ + private: + void init_symbols_0(); + + /* Reset signal definitions */ + private: + tUInt8 PORT_RST_N; + + /* Port definitions */ + public: + + /* Publicly accessible definitions */ + public: + tUInt8 DEF_done_all__h3778; + tUInt8 DEF_ready_start__h3375; + tUInt8 DEF_b__h2341; + tUInt8 DEF_b__h868; + tUInt8 DEF_b_serverAdapter_s1___d84; + tUInt8 DEF_a_serverAdapter_s1___d35; + tUInt8 DEF_b_serverAdapter_cnt_3_whas____d63; + tUInt8 DEF_b_serverAdapter_cnt_2_whas____d61; + tUInt8 DEF_b_serverAdapter_cnt_1_whas____d60; + tUInt8 DEF_b_serverAdapter_outData_ff_i_notEmpty____d54; + tUInt8 DEF_a_serverAdapter_cnt_3_whas____d13; + tUInt8 DEF_a_serverAdapter_cnt_2_whas____d11; + tUInt8 DEF_a_serverAdapter_cnt_1_whas____d10; + tUInt8 DEF_a_serverAdapter_outData_ff_i_notEmpty____d4; + tUInt8 DEF_b_serverAdapter_s1_4_BIT_0___d85; + tUInt8 DEF_a_serverAdapter_s1_5_BIT_0___d36; + + /* Local definitions */ + private: + tUInt32 DEF_x_wget__h1850; + tUInt32 DEF_x_wget__h374; + tUInt32 DEF_x__h4027; + tUInt8 DEF_x__h4079; + tUInt8 DEF_x__h3690; + tUInt8 DEF_y__h3685; + tUInt32 DEF_x__h1948; + tUInt32 DEF_x__h472; + tUInt8 DEF__0_CONCAT_DONTCARE___d26; + tUInt8 DEF_x__h3688; + tUInt8 DEF_y__h3687; + + /* Rules */ + public: + void RL_a_serverAdapter_outData_enqueue(); + void RL_a_serverAdapter_outData_dequeue(); + void RL_a_serverAdapter_cnt_finalAdd(); + void RL_a_serverAdapter_s1__dreg_update(); + void RL_a_serverAdapter_stageReadResponseAlways(); + void RL_a_serverAdapter_moveToOutFIFO(); + void RL_a_serverAdapter_overRun(); + void RL_b_serverAdapter_outData_enqueue(); + void RL_b_serverAdapter_outData_dequeue(); + void RL_b_serverAdapter_cnt_finalAdd(); + void RL_b_serverAdapter_s1__dreg_update(); + void RL_b_serverAdapter_stageReadResponseAlways(); + void RL_b_serverAdapter_moveToOutFIFO(); + void RL_b_serverAdapter_overRun(); + void RL_process_a(); + void RL_process_b(); + void RL_mult_inputs(); + + /* Methods */ + public: + void METH_start(tUInt8 ARG_start_dim_in, tUInt8 ARG_start_i); + tUInt8 METH_RDY_start(); + tUInt32 METH_response(); + tUInt8 METH_RDY_response(); + + /* Reset routines */ + public: + void reset_RST_N(tUInt8 ARG_rst_in); + + /* Static handles to reset routines */ + public: + + /* Pointers to reset fns in parent module for asserting output resets */ + private: + + /* Functions for the parent module to register its reset fns */ + public: + + /* Functions to set the elaborated clock id */ + public: + void set_clk_0(char const *s); + + /* State dumping routine */ + public: + void dump_state(unsigned int indent); + + /* VCD dumping routines */ + public: + unsigned int dump_VCD_defs(unsigned int levels); + void dump_VCD(tVCDDumpType dt, unsigned int levels, MOD_mkVectorDot &backing); + void vcd_defs(tVCDDumpType dt, MOD_mkVectorDot &backing); + void vcd_prims(tVCDDumpType dt, MOD_mkVectorDot &backing); +}; + +#endif /* ifndef __mkVectorDot_h__ */ diff --git a/part_2_vector_multiply/build/mkVectorDot.o b/part_2_vector_multiply/build/mkVectorDot.o new file mode 100644 index 0000000..d8f413f Binary files /dev/null and b/part_2_vector_multiply/build/mkVectorDot.o differ diff --git a/part_2_vector_multiply/build/model_mkTb.cxx b/part_2_vector_multiply/build/model_mkTb.cxx new file mode 100644 index 0000000..0d0e719 --- /dev/null +++ b/part_2_vector_multiply/build/model_mkTb.cxx @@ -0,0 +1,344 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:09 CET 2024 + * + */ +#include "bluesim_primitives.h" +#include "model_mkTb.h" + +#include +#include +#include "bluesim_kernel_api.h" +#include "bs_vcd.h" +#include "bs_reset.h" + + +/* Constructor */ +MODEL_mkTb::MODEL_mkTb() +{ + mkTb_instance = NULL; +} + +/* Function for creating a new model */ +void * new_MODEL_mkTb() +{ + MODEL_mkTb *model = new MODEL_mkTb(); + return (void *)(model); +} + +/* Schedule functions */ + +static void schedule_posedge_CLK(tSimStateHdl simHdl, void *instance_ptr) + { + MOD_mkTb &INST_top = *((MOD_mkTb *)(instance_ptr)); + tUInt8 DEF_INST_top_INST_mma_DEF_a_serverAdapter_s1_5_BIT_1___d40; + tUInt8 DEF_INST_top_INST_mma_DEF_b_serverAdapter_s1_4_BIT_1___d89; + tUInt8 DEF_INST_top_INST_mma_DEF_done_a__h3377; + tUInt8 DEF_INST_top_INST_mma_DEF_done_b__h3592; + tUInt8 DEF_INST_top_INST_mma_DEF_req_a_ready__h3381; + tUInt8 DEF_INST_top_INST_mma_DEF_req_b_ready__h3596; + tUInt8 DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_ff_i_notFull____d38; + tUInt8 DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_beforeDeq_read____d45; + tUInt8 DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_enqw_whas____d1; + tUInt8 DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_dequeueing_whas____d2; + tUInt8 DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_ff_i_notFull____d87; + tUInt8 DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_beforeDeq_read____d94; + tUInt8 DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_enqw_whas____d51; + tUInt8 DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_dequeueing_whas____d52; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_outData_enqueue; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_outData_enqueue; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_outData_dequeue; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_outData_dequeue; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_cnt_finalAdd; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_cnt_finalAdd; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_s1__dreg_update; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_s1__dreg_update; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_stageReadResponseAlways; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_stageReadResponseAlways; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_moveToOutFIFO; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_moveToOutFIFO; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_overRun; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_overRun; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_outData_enqueue; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_outData_enqueue; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_outData_dequeue; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_outData_dequeue; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_cnt_finalAdd; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_cnt_finalAdd; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_s1__dreg_update; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_s1__dreg_update; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_stageReadResponseAlways; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_stageReadResponseAlways; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_moveToOutFIFO; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_moveToOutFIFO; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_overRun; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_overRun; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_process_a; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_process_a; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_process_b; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_process_b; + tUInt8 DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_mult_inputs; + tUInt8 DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_mult_inputs; + tUInt8 DEF_INST_top_DEF_going__h371; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_inc_ctr; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_inc_ctr; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_start; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_start; + tUInt8 DEF_INST_top_DEF_CAN_FIRE_RL_resp; + tUInt8 DEF_INST_top_DEF_WILL_FIRE_RL_resp; + DEF_INST_top_DEF_CAN_FIRE_RL_inc_ctr = (tUInt8)1u; + DEF_INST_top_DEF_WILL_FIRE_RL_inc_ctr = DEF_INST_top_DEF_CAN_FIRE_RL_inc_ctr; + DEF_INST_top_DEF_going__h371 = INST_top.INST_going.METH_read(); + DEF_INST_top_DEF_CAN_FIRE_RL_resp = INST_top.INST_mma.METH_RDY_response() && !DEF_INST_top_DEF_going__h371; + DEF_INST_top_DEF_WILL_FIRE_RL_resp = DEF_INST_top_DEF_CAN_FIRE_RL_resp; + DEF_INST_top_DEF_CAN_FIRE_RL_start = INST_top.INST_mma.METH_RDY_start() && DEF_INST_top_DEF_going__h371; + DEF_INST_top_DEF_WILL_FIRE_RL_start = DEF_INST_top_DEF_CAN_FIRE_RL_start; + INST_top.INST_mma.DEF_a_serverAdapter_s1___d35 = INST_top.INST_mma.INST_a_serverAdapter_s1.METH_read(); + DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_ff_i_notFull____d38 = INST_top.INST_mma.INST_a_serverAdapter_outData_ff.METH_i_notFull(); + DEF_INST_top_INST_mma_DEF_a_serverAdapter_s1_5_BIT_1___d40 = (tUInt8)((INST_top.INST_mma.DEF_a_serverAdapter_s1___d35) >> 1u); + INST_top.INST_mma.DEF_a_serverAdapter_s1_5_BIT_0___d36 = (tUInt8)((tUInt8)1u & (INST_top.INST_mma.DEF_a_serverAdapter_s1___d35)); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_moveToOutFIFO = (!(INST_top.INST_mma.DEF_a_serverAdapter_s1_5_BIT_0___d36) || DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_ff_i_notFull____d38) && DEF_INST_top_INST_mma_DEF_a_serverAdapter_s1_5_BIT_1___d40; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_moveToOutFIFO = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_moveToOutFIFO; + DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_beforeDeq_read____d45 = INST_top.INST_mma.INST_a_serverAdapter_outData_beforeDeq.METH_read(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_overRun = DEF_INST_top_INST_mma_DEF_a_serverAdapter_s1_5_BIT_1___d40 && ((!INST_top.INST_mma.INST_a_serverAdapter_outData_beforeEnq.METH_read() || !DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_beforeDeq_read____d45) || !DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_ff_i_notFull____d38); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_overRun = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_overRun; + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_s1__dreg_update = (tUInt8)1u; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_s1__dreg_update = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_s1__dreg_update; + INST_top.INST_mma.DEF_b_serverAdapter_s1___d84 = INST_top.INST_mma.INST_b_serverAdapter_s1.METH_read(); + DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_ff_i_notFull____d87 = INST_top.INST_mma.INST_b_serverAdapter_outData_ff.METH_i_notFull(); + DEF_INST_top_INST_mma_DEF_b_serverAdapter_s1_4_BIT_1___d89 = (tUInt8)((INST_top.INST_mma.DEF_b_serverAdapter_s1___d84) >> 1u); + INST_top.INST_mma.DEF_b_serverAdapter_s1_4_BIT_0___d85 = (tUInt8)((tUInt8)1u & (INST_top.INST_mma.DEF_b_serverAdapter_s1___d84)); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_moveToOutFIFO = (!(INST_top.INST_mma.DEF_b_serverAdapter_s1_4_BIT_0___d85) || DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_ff_i_notFull____d87) && DEF_INST_top_INST_mma_DEF_b_serverAdapter_s1_4_BIT_1___d89; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_moveToOutFIFO = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_moveToOutFIFO; + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_s1__dreg_update = (tUInt8)1u; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_s1__dreg_update = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_s1__dreg_update; + DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_beforeDeq_read____d94 = INST_top.INST_mma.INST_b_serverAdapter_outData_beforeDeq.METH_read(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_overRun = DEF_INST_top_INST_mma_DEF_b_serverAdapter_s1_4_BIT_1___d89 && ((!INST_top.INST_mma.INST_b_serverAdapter_outData_beforeEnq.METH_read() || !DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_beforeDeq_read____d94) || !DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_ff_i_notFull____d87); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_overRun = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_overRun; + INST_top.INST_mma.DEF_ready_start__h3375 = INST_top.INST_mma.INST_ready_start.METH_read(); + INST_top.INST_mma.DEF_b__h868 = INST_top.INST_mma.INST_a_serverAdapter_cnt.METH_read(); + DEF_INST_top_INST_mma_DEF_req_a_ready__h3381 = INST_top.INST_mma.INST_req_a_ready.METH_read(); + DEF_INST_top_INST_mma_DEF_done_a__h3377 = INST_top.INST_mma.INST_done_a.METH_read(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_process_a = primSLT8(1u, + 3u, + (tUInt8)(INST_top.INST_mma.DEF_b__h868), + 3u, + (tUInt8)3u) && ((INST_top.INST_mma.DEF_ready_start__h3375 && !DEF_INST_top_INST_mma_DEF_done_a__h3377) && !DEF_INST_top_INST_mma_DEF_req_a_ready__h3381); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_process_a = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_process_a; + INST_top.INST_mma.DEF_b__h2341 = INST_top.INST_mma.INST_b_serverAdapter_cnt.METH_read(); + DEF_INST_top_INST_mma_DEF_req_b_ready__h3596 = INST_top.INST_mma.INST_req_b_ready.METH_read(); + DEF_INST_top_INST_mma_DEF_done_b__h3592 = INST_top.INST_mma.INST_done_b.METH_read(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_process_b = primSLT8(1u, + 3u, + (tUInt8)(INST_top.INST_mma.DEF_b__h2341), + 3u, + (tUInt8)3u) && ((INST_top.INST_mma.DEF_ready_start__h3375 && !DEF_INST_top_INST_mma_DEF_done_b__h3592) && !DEF_INST_top_INST_mma_DEF_req_b_ready__h3596); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_process_b = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_process_b; + if (DEF_INST_top_DEF_WILL_FIRE_RL_inc_ctr) + INST_top.RL_inc_ctr(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_resp) + INST_top.RL_resp(); + if (DEF_INST_top_DEF_WILL_FIRE_RL_start) + INST_top.RL_start(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_overRun) + INST_top.INST_mma.RL_a_serverAdapter_overRun(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_moveToOutFIFO) + INST_top.INST_mma.RL_a_serverAdapter_moveToOutFIFO(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_overRun) + INST_top.INST_mma.RL_b_serverAdapter_overRun(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_moveToOutFIFO) + INST_top.INST_mma.RL_b_serverAdapter_moveToOutFIFO(); + INST_top.INST_mma.DEF_done_all__h3778 = INST_top.INST_mma.INST_done_all.METH_read(); + DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_enqw_whas____d51 = INST_top.INST_mma.INST_b_serverAdapter_outData_enqw.METH_whas(); + INST_top.INST_mma.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54 = INST_top.INST_mma.INST_b_serverAdapter_outData_ff.METH_i_notEmpty(); + DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_enqw_whas____d1 = INST_top.INST_mma.INST_a_serverAdapter_outData_enqw.METH_whas(); + INST_top.INST_mma.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4 = INST_top.INST_mma.INST_a_serverAdapter_outData_ff.METH_i_notEmpty(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_mult_inputs = (((DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_beforeDeq_read____d45 && (INST_top.INST_mma.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4 || DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_enqw_whas____d1)) && (DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_beforeDeq_read____d94 && (INST_top.INST_mma.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54 || DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_enqw_whas____d51))) && (((INST_top.INST_mma.DEF_ready_start__h3375 && DEF_INST_top_INST_mma_DEF_req_a_ready__h3381) && DEF_INST_top_INST_mma_DEF_req_b_ready__h3596) && !(INST_top.INST_mma.DEF_done_all__h3778))) && !(DEF_INST_top_DEF_CAN_FIRE_RL_resp || DEF_INST_top_DEF_CAN_FIRE_RL_start); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_mult_inputs = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_mult_inputs; + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_mult_inputs) + INST_top.INST_mma.RL_mult_inputs(); + DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_dequeueing_whas____d2 = INST_top.INST_mma.INST_a_serverAdapter_outData_dequeueing.METH_whas(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_outData_dequeue = DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_dequeueing_whas____d2 && INST_top.INST_mma.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_outData_dequeue = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_outData_dequeue; + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_outData_enqueue = DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_enqw_whas____d1 && (!DEF_INST_top_INST_mma_DEF_a_serverAdapter_outData_dequeueing_whas____d2 || INST_top.INST_mma.DEF_a_serverAdapter_outData_ff_i_notEmpty____d4); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_outData_enqueue = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_outData_enqueue; + DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_dequeueing_whas____d52 = INST_top.INST_mma.INST_b_serverAdapter_outData_dequeueing.METH_whas(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_outData_dequeue = DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_dequeueing_whas____d52 && INST_top.INST_mma.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_outData_dequeue = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_outData_dequeue; + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_outData_enqueue = DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_enqw_whas____d51 && (!DEF_INST_top_INST_mma_DEF_b_serverAdapter_outData_dequeueing_whas____d52 || INST_top.INST_mma.DEF_b_serverAdapter_outData_ff_i_notEmpty____d54); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_outData_enqueue = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_outData_enqueue; + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_outData_dequeue) + INST_top.INST_mma.RL_a_serverAdapter_outData_dequeue(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_outData_enqueue) + INST_top.INST_mma.RL_a_serverAdapter_outData_enqueue(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_outData_dequeue) + INST_top.INST_mma.RL_b_serverAdapter_outData_dequeue(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_outData_enqueue) + INST_top.INST_mma.RL_b_serverAdapter_outData_enqueue(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_process_a) + INST_top.INST_mma.RL_process_a(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_stageReadResponseAlways = INST_top.INST_mma.INST_a_serverAdapter_writeWithResp.METH_whas(); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_stageReadResponseAlways = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_stageReadResponseAlways; + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_stageReadResponseAlways) + INST_top.INST_mma.RL_a_serverAdapter_stageReadResponseAlways(); + INST_top.INST_mma.DEF_a_serverAdapter_cnt_3_whas____d13 = INST_top.INST_mma.INST_a_serverAdapter_cnt_3.METH_whas(); + INST_top.INST_mma.DEF_a_serverAdapter_cnt_2_whas____d11 = INST_top.INST_mma.INST_a_serverAdapter_cnt_2.METH_whas(); + INST_top.INST_mma.DEF_a_serverAdapter_cnt_1_whas____d10 = INST_top.INST_mma.INST_a_serverAdapter_cnt_1.METH_whas(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_cnt_finalAdd = (INST_top.INST_mma.DEF_a_serverAdapter_cnt_1_whas____d10 || INST_top.INST_mma.DEF_a_serverAdapter_cnt_2_whas____d11) || INST_top.INST_mma.DEF_a_serverAdapter_cnt_3_whas____d13; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_cnt_finalAdd = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_a_serverAdapter_cnt_finalAdd; + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_cnt_finalAdd) + INST_top.INST_mma.RL_a_serverAdapter_cnt_finalAdd(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_a_serverAdapter_s1__dreg_update) + INST_top.INST_mma.RL_a_serverAdapter_s1__dreg_update(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_process_b) + INST_top.INST_mma.RL_process_b(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_stageReadResponseAlways = INST_top.INST_mma.INST_b_serverAdapter_writeWithResp.METH_whas(); + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_stageReadResponseAlways = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_stageReadResponseAlways; + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_stageReadResponseAlways) + INST_top.INST_mma.RL_b_serverAdapter_stageReadResponseAlways(); + INST_top.INST_mma.DEF_b_serverAdapter_cnt_3_whas____d63 = INST_top.INST_mma.INST_b_serverAdapter_cnt_3.METH_whas(); + INST_top.INST_mma.DEF_b_serverAdapter_cnt_2_whas____d61 = INST_top.INST_mma.INST_b_serverAdapter_cnt_2.METH_whas(); + INST_top.INST_mma.DEF_b_serverAdapter_cnt_1_whas____d60 = INST_top.INST_mma.INST_b_serverAdapter_cnt_1.METH_whas(); + DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_cnt_finalAdd = (INST_top.INST_mma.DEF_b_serverAdapter_cnt_1_whas____d60 || INST_top.INST_mma.DEF_b_serverAdapter_cnt_2_whas____d61) || INST_top.INST_mma.DEF_b_serverAdapter_cnt_3_whas____d63; + DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_cnt_finalAdd = DEF_INST_top_INST_mma_DEF_CAN_FIRE_RL_b_serverAdapter_cnt_finalAdd; + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_cnt_finalAdd) + INST_top.INST_mma.RL_b_serverAdapter_cnt_finalAdd(); + if (DEF_INST_top_INST_mma_DEF_WILL_FIRE_RL_b_serverAdapter_s1__dreg_update) + INST_top.INST_mma.RL_b_serverAdapter_s1__dreg_update(); + INST_top.INST_mma.INST_b_serverAdapter_s1_1.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_writeWithResp.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_cnt_3.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_cnt_2.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_cnt_1.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_outData_dequeueing.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_outData_enqw.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_b_memory.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_s1_1.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_writeWithResp.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_cnt_3.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_cnt_2.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_cnt_1.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_outData_dequeueing.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_outData_enqw.clk((tUInt8)1u, (tUInt8)1u); + INST_top.INST_mma.INST_a_memory.clk((tUInt8)1u, (tUInt8)1u); + if (do_reset_ticks(simHdl)) + { + INST_top.INST_mma.INST_a_serverAdapter_outData_ff.rst_tick_clk((tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_cnt.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_a_serverAdapter_s1.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_outData_ff.rst_tick_clk((tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_cnt.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_b_serverAdapter_s1.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_output_res.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_dim.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_ready_start.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_pos_a.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_pos_b.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_pos_out.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_done_all.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_done_a.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_done_b.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_req_a_ready.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_req_b_ready.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_mma.INST_i.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_ctr.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_going.rst_tick__clk__1((tUInt8)1u); + INST_top.INST_i.rst_tick__clk__1((tUInt8)1u); + } + }; + +/* Model creation/destruction functions */ + +void MODEL_mkTb::create_model(tSimStateHdl simHdl, bool master) +{ + sim_hdl = simHdl; + init_reset_request_counters(sim_hdl); + mkTb_instance = new MOD_mkTb(sim_hdl, "top", NULL); + bk_get_or_define_clock(sim_hdl, "CLK"); + if (master) + { + bk_alter_clock(sim_hdl, bk_get_clock_by_name(sim_hdl, "CLK"), CLK_LOW, false, 0llu, 5llu, 5llu); + bk_use_default_reset(sim_hdl); + } + bk_set_clock_event_fn(sim_hdl, + bk_get_clock_by_name(sim_hdl, "CLK"), + schedule_posedge_CLK, + NULL, + (tEdgeDirection)(POSEDGE)); + (mkTb_instance->INST_mma.INST_a_memory.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_outData_ff.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_outData_enqw.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_outData_dequeueing.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_cnt_1.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_cnt_2.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_cnt_3.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_writeWithResp.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_a_serverAdapter_s1_1.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_memory.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_outData_ff.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_outData_enqw.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_outData_dequeueing.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_cnt_1.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_cnt_2.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_cnt_3.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_writeWithResp.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.INST_b_serverAdapter_s1_1.set_clk_0)("CLK"); + (mkTb_instance->INST_mma.set_clk_0)("CLK"); + (mkTb_instance->set_clk_0)("CLK"); +} +void MODEL_mkTb::destroy_model() +{ + delete mkTb_instance; + mkTb_instance = NULL; +} +void MODEL_mkTb::reset_model(bool asserted) +{ + (mkTb_instance->reset_RST_N)(asserted ? (tUInt8)0u : (tUInt8)1u); +} +void * MODEL_mkTb::get_instance() +{ + return mkTb_instance; +} + +/* Fill in version numbers */ +void MODEL_mkTb::get_version(char const **name, char const **build) +{ + *name = "2023.07-39-g15463f50"; + *build = "15463f50"; +} + +/* Get the model creation time */ +time_t MODEL_mkTb::get_creation_time() +{ + + /* Thu Feb 22 17:09:09 UTC 2024 */ + return 1708621749llu; +} + +/* State dumping function */ +void MODEL_mkTb::dump_state() +{ + (mkTb_instance->dump_state)(0u); +} + +/* VCD dumping functions */ +MOD_mkTb & mkTb_backing(tSimStateHdl simHdl) +{ + static MOD_mkTb *instance = NULL; + if (instance == NULL) + { + vcd_set_backing_instance(simHdl, true); + instance = new MOD_mkTb(simHdl, "top", NULL); + vcd_set_backing_instance(simHdl, false); + } + return *instance; +} +void MODEL_mkTb::dump_VCD_defs() +{ + (mkTb_instance->dump_VCD_defs)(vcd_depth(sim_hdl)); +} +void MODEL_mkTb::dump_VCD(tVCDDumpType dt) +{ + (mkTb_instance->dump_VCD)(dt, vcd_depth(sim_hdl), mkTb_backing(sim_hdl)); +} diff --git a/part_2_vector_multiply/build/model_mkTb.h b/part_2_vector_multiply/build/model_mkTb.h new file mode 100644 index 0000000..dd0db69 --- /dev/null +++ b/part_2_vector_multiply/build/model_mkTb.h @@ -0,0 +1,53 @@ +/* + * Generated by Bluespec Compiler, version 2023.07-39-g15463f50 (build 15463f50) + * + * On Thu Feb 22 18:09:09 CET 2024 + * + */ + +/* Generation options: */ +#ifndef __model_mkTb_h__ +#define __model_mkTb_h__ + +#include "bluesim_types.h" +#include "bs_module.h" +#include "bluesim_primitives.h" +#include "bs_vcd.h" + +#include "bs_model.h" +#include "mkTb.h" + +/* Class declaration for a model of mkTb */ +class MODEL_mkTb : public Model { + + /* Top-level module instance */ + private: + MOD_mkTb *mkTb_instance; + + /* Handle to the simulation kernel */ + private: + tSimStateHdl sim_hdl; + + /* Constructor */ + public: + MODEL_mkTb(); + + /* Functions required by the kernel */ + public: + void create_model(tSimStateHdl simHdl, bool master); + void destroy_model(); + void reset_model(bool asserted); + void get_version(char const **name, char const **build); + time_t get_creation_time(); + void * get_instance(); + void dump_state(); + void dump_VCD_defs(); + void dump_VCD(tVCDDumpType dt); +}; + +/* Function for creating a new model */ +extern "C" { + void * new_MODEL_mkTb(); +} + +#endif /* ifndef __model_mkTb_h__ */ diff --git a/part_2_vector_multiply/build/model_mkTb.o b/part_2_vector_multiply/build/model_mkTb.o new file mode 100644 index 0000000..117fa59 Binary files /dev/null and b/part_2_vector_multiply/build/model_mkTb.o differ