diff --git a/wrappers/simulink/munge_blk.slx b/wrappers/simulink/munge_blk.slx index a83ab4a1..72937506 100644 Binary files a/wrappers/simulink/munge_blk.slx and b/wrappers/simulink/munge_blk.slx differ diff --git a/wrappers/simulink/munge_code_gen.m b/wrappers/simulink/munge_code_gen.m index cdd44e14..13fcf856 100644 --- a/wrappers/simulink/munge_code_gen.m +++ b/wrappers/simulink/munge_code_gen.m @@ -9,6 +9,7 @@ %and what it will be named vhdlfile = fullfile(vhdlfilefolder, [bdroot '_munge_static.vhd']); %filename for vhd file + inout_port_count = number_of_divisions*division_size_bits; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%upperdec%%%%%%%%%%%%%%%%%%%%%%%%%%%%% upperlines = [ "LIBRARY IEEE, common_pkg_lib, casper_flow_control_lib;" @@ -18,8 +19,8 @@ " port (" " clk : in std_logic := '1';" " ce : in std_logic := '1';" - " din : in std_logic_vector;" - " dout : out std_logic_vector" + sprintf(" din : in std_logic_vector(%d-1 downto 0);", inout_port_count) + sprintf(" dout : out std_logic_vector(%d-1 downto 0)", inout_port_count) " );" "end ENTITY;" "ARCHITECTURE rtl of munge_static is"