Design Technology | High Level Synthesis | How Does Synthagate work | Dp.vhd
-- Automatically generated using Goals v1.0.1.170 08/05/2018 23:00:35
-----------------------------
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use work.components.all;
-----------------------------
entity dp is
port
(
-- Inputs from control unit
codcomplete_set : in std_logic; --(y1)
codcomplete_reset : in std_logic; --(y2)
relem_en : in std_logic; --(y3)
decodcomplete_set : in std_logic; --(y4)
decodcomplete_reset : in std_logic; --(y5)
cnt_m1_m3_count : in std_logic; --(y6)
ctr_mux4_3 : in std_logic; --(y7)
ctr_mux4_0 : in std_logic; --(y8)
ctr_mux6_1 : in std_logic; --(y9)
m1_wren : in std_logic; --(y10)
rfilelength_en : in std_logic; --(y11)
mac1_reset : in std_logic; --(y12)
shcnt_reset : in std_logic; --(y13)
cnt_count : in std_logic; --(y14)
ctr_mux4_1 : in std_logic; --(y15)
br_en : in std_logic; --(y16)
cnt_reset : in std_logic; --(y17)
cnt_m2_reset : in std_logic; --(y18)
mac2_reset : in std_logic; --(y19)
cnt_m1_m3_en : in std_logic; --(y20)
ctr_mux1_1 : in std_logic; --(y21)
ctr_mux3_2 : in std_logic; --(y22)
ctr_mux3_1 : in std_logic; --(y23)
ctr_mux5_0 : in std_logic; --(y24)
cnt_m1_m3_rcount : in std_logic; --(y25)
rt2_en : in std_logic; --(y26)
cnt_elem_count : in std_logic; --(y27)
rt1_en : in std_logic; --(y28)
cnt_elem_reset : in std_logic; --(y29)
cnt_m2_count : in std_logic; --(y30)
m2_wren : in std_logic; --(y31)
mac2_count : in std_logic; --(y32)
ctr_mux2 : in std_logic; --(y33)
rbyte_en_1 : in std_logic; --(y34)
ctr_mux0_1 : in std_logic; --(y35)
rbyte_en_0 : in std_logic; --(y36)
bitcnt_reset : in std_logic; --(y37)
ctr_mux4_2 : in std_logic; --(y38)
bitcnt_count : in std_logic; --(y39)
shcnt_count : in std_logic; --(y40)
ctr_mux0_0 : in std_logic; --(y41)
ctr_mux1_0 : in std_logic; --(y42)
ctr_mux3_0 : in std_logic; --(y43)
ctr_mux5_1 : in std_logic; --(y44)
rmask_en : in std_logic; --(y45)
mac1_en : in std_logic; --(y46)
mac1_count : in std_logic; --(y47)
ctr_mux6_0 : in std_logic; --(y48)
rtemp1_en : in std_logic; --(y49)
rd_en : in std_logic; --(y50)
rmin_en : in std_logic; --(y51)
rmax_en : in std_logic; --(y52)
ctr_mux1_2 : in std_logic; --(y53)
rlengthd_en : in std_logic; --(y54)
m3_wren : in std_logic; --(y55)
tempreg8_1_en : in std_logic; --(y56)
tempreg16_1_en : in std_logic; --(y57)
-- Inputs from outside
clk : in std_logic;
rst : in std_logic;
ext_adr : in std_logic_vector(15 downto 0);
ext_out : in std_logic_vector(7 downto 0);
nelem : in std_logic_vector(15 downto 0);
-- Outputs to control unit
comp16_1_dout : out std_logic; --(x6)
comp16_2_dout : out std_logic; --(x7)
comp8_3_dout : out std_logic; --(x8)
comp8_4_dout : out std_logic; --(x9)
comp16_5_dout : out std_logic; --(x10)
comp8_6_dout : out std_logic; --(x11)
comp16_7_dout : out std_logic; --(x12)
comp4_8_dout : out std_logic; --(x13)
comp8_9_dout : out std_logic; --(x14)
comp8_10_dout : out std_logic; --(x15)
comp8_11_dout : out std_logic; --(x16)
comp8_12_dout : out std_logic; --(x17)
comp8_13_dout : out std_logic; --(x18)
comp8_14_dout : out std_logic; --(x19)
-- Outputs to outside
codcomplete : out std_logic;
decodcomplete : out std_logic;
ext_in : out std_logic_vector(7 downto 0);
rwrite2m2 : out std_logic_vector(15 downto 0);
rwrite2m3 : out std_logic_vector(15 downto 0)
);
end dp;
-----------------------------------------------
architecture arc_dp of dp is
signal mux6_dout : std_logic_vector (15 downto 0);
signal mux0_dout : std_logic;
signal mux1_dout : std_logic_vector (3 downto 0);
signal mux2_dout : std_logic_vector (6 downto 0);
signal mux3_dout : std_logic_vector (7 downto 0);
signal mux4_dout : std_logic_vector (7 downto 0);
signal mux5_dout : std_logic_vector (7 downto 0);
signal alu16_1_dout : std_logic_vector (15 downto 0);
signal alu8_1_dout : std_logic_vector (7 downto 0);
signal bitcnt_dout : std_logic_vector (3 downto 0);
signal br_dout : std_logic_vector (7 downto 0);
signal cnt_dout : std_logic_vector (7 downto 0);
signal cnt_elem_dout : std_logic_vector (15 downto 0);
signal cnt_m1_m3_dout : std_logic_vector (15 downto 0);
signal m1_q : std_logic_vector (7 downto 0);
signal m2_q : std_logic_vector (7 downto 0);
signal m3_q : std_logic_vector (7 downto 0);
signal mac1_dout : std_logic_vector (15 downto 0);
signal mac2_dout : std_logic_vector (15 downto 0);
signal rbyte_dout : std_logic_vector (7 downto 0);
signal rd_dout : std_logic_vector (7 downto 0);
signal relem_dout : std_logic_vector (15 downto 0);
signal rfilelength_dout : std_logic_vector (15 downto 0);
signal rlengthd_dout : std_logic_vector (7 downto 0);
signal rmask_dout : std_logic_vector (7 downto 0);
signal rmax_dout : std_logic_vector (7 downto 0);
signal rmin_dout : std_logic_vector (7 downto 0);
signal rt1_dout : std_logic_vector (7 downto 0);
signal rt2_dout : std_logic_vector (7 downto 0);
signal rtemp1_dout : std_logic_vector (15 downto 0);
signal shcnt_dout : std_logic_vector (7 downto 0);
signal tempreg16_1_dout : std_logic_vector (15 downto 0);
signal tempreg8_1_dout : std_logic_vector (7 downto 0);
signal ctr_mux0 : std_logic_vector (1 downto 0);
signal ctr_mux1 : std_logic_vector (2 downto 0);
signal ctr_mux3 : std_logic_vector (2 downto 0);
signal ctr_mux4 : std_logic_vector (3 downto 0);
signal ctr_mux5 : std_logic_vector (1 downto 0);
signal ctr_mux6 : std_logic_vector (1 downto 0);
signal rbyte_en : std_logic_vector (1 downto 0);
signal rbyte_din : std_logic_vector (7 downto 0);
signal clock : std_logic;
begin
---------
-- Mux 6
---------
u1_mux6 : mux_3x16 port map (mac2_dout, mac1_dout, ext_adr, ctr_mux6, mux6_dout);
---------
-- Mux 0
---------
u2_mux0 : mux_3x1 port map ('0', '1', tempreg8_1_dout(0), ctr_mux0, mux0_dout);
---------
-- Mux 1
---------
u3_mux1 : mux_5x4 port map ("1010", "0011", "0010", "1100", "0001", ctr_mux1, mux1_dout);
---------
-- Mux 2
---------
u4_mux2 : mux_2x7 port map ("0000000", tempreg8_1_dout(7 downto 1), ctr_mux2, mux2_dout);
---------
-- Mux 3
---------
u5_mux3 : mux_8x8 port map (rbyte_dout, rmask_dout, rt2_dout, cnt_dout, rd_dout, rmax_dout, rt1_dout, br_dout, ctr_mux3, mux3_dout);
---------
-- Mux 4
---------
u6_mux4 : mux_12x8 port map (m2_q, alu8_1_dout, tempreg8_1_dout, br_dout, m1_q, rbyte_dout, cnt_dout, x"80", rmin_dout, m3_q, x"01", x"ff", ctr_mux4, mux4_dout);
---------
-- Mux 5
---------
u7_mux5 : mux_3x8 port map (x"01", rmin_dout, rt2_dout, ctr_mux5, mux5_dout);
---------
-- m1
---------
u8_m1 : mem port map (mux6_dout, clock, ext_out, m1_wren, m1_q);
---------
-- m2
---------
u9_m2 : mem port map (mux6_dout, clock, br_dout, m2_wren, m2_q);
---------
-- m3
---------
u10_m3 : mem port map (mux6_dout, clock, br_dout, m3_wren, m3_q);
---------
-- codcomplete
---------
u11_codcomplete : rsff port map (clk, codcomplete_reset, codcomplete_set, rst, codcomplete);
---------
-- decodcomplete
---------
u12_decodcomplete : rsff port map (clk, decodcomplete_reset, decodcomplete_set, rst, decodcomplete);
---------
-- br
---------
u13_br : reg_8bit port map (clk, rst, mux4_dout, br_en, br_dout);
---------
-- rbyte
---------
u14_rbyte : reg_8bit_2en port map (clk, rst, rbyte_din, rbyte_en, rbyte_dout);
---------
-- rd
---------
u15_rd : reg_8bit port map (clk, rst, mux4_dout, rd_en, rd_dout);
---------
-- relem
---------
u16_relem : reg_16bit port map (clk, rst, nelem, relem_en, relem_dout);
---------
-- rfilelength
---------
u17_rfilelength : reg_16bit port map (clk, rst, cnt_m1_m3_dout, rfilelength_en, rfilelength_dout);
---------
-- rlengthd
---------
u18_rlengthd : reg_8bit port map (clk, rst, mux3_dout, rlengthd_en, rlengthd_dout);
---------
-- rmask
---------
u19_rmask : reg_8bit port map (clk, rst, mux4_dout, rmask_en, rmask_dout);
---------
-- rmax
---------
u20_rmax : reg_8bit port map (clk, rst, br_dout, rmax_en, rmax_dout);
---------
-- rmin
---------
u21_rmin : reg_8bit port map (clk, rst, br_dout, rmin_en, rmin_dout);
---------
-- rt1
---------
u22_rt1 : reg_8bit port map (clk, rst, mux4_dout, rt1_en, rt1_dout);
---------
-- rt2
---------
u23_rt2 : reg_8bit port map (clk, rst, mux4_dout, rt2_en, rt2_dout);
---------
-- rtemp1
---------
u24_rtemp1 : reg_16bit port map (clk, rst, mac1_dout, rtemp1_en, rtemp1_dout);
---------
-- tempreg16_1
---------
u25_tempreg16_1 : reg_16bit port map (clk, rst, alu16_1_dout, tempreg16_1_en, tempreg16_1_dout);
---------
-- tempreg8_1
---------
u26_tempreg8_1 : reg_8bit port map (clk, rst, alu8_1_dout, tempreg8_1_en, tempreg8_1_dout);
---------
-- cnt_m1_m3
---------
u27_cnt_m1_m3 : counter_pm_16bit port map (clk, rst, cnt_m1_m3_en, cnt_m1_m3_count, cnt_m1_m3_rcount, tempreg16_1_dout, cnt_m1_m3_dout);
---------
-- mac1
---------
u28_mac1 : counter_ps_16bit port map (clk, rst, mac1_en, mac1_reset, mac1_count, rtemp1_dout, mac1_dout);
---------
-- bitcnt
---------
u29_bitcnt : countero_ps_4bit port map (clk, rst, bitcnt_reset, bitcnt_count, bitcnt_dout);
---------
-- cnt
---------
u30_cnt : countero_ps_8bit port map (clk, rst, cnt_reset, cnt_count, cnt_dout);
---------
-- cnt_elem
---------
u31_cnt_elem : countero_ps_16bit port map (clk, rst, cnt_elem_reset, cnt_elem_count, cnt_elem_dout);
---------
-- cnt_m2
---------
u32_cnt_m2 : countero_ps_16bit port map (clk, rst, cnt_m2_reset, cnt_m2_count, rwrite2m2);
---------
-- mac2
---------
u33_mac2 : countero_ps_16bit port map (clk, rst, mac2_reset, mac2_count, mac2_dout);
---------
-- shcnt
---------
u34_shcnt : countero_ps_8bit port map (clk, rst, shcnt_reset, shcnt_count, shcnt_dout);
---------
-- comp4_8
---------
u35_comp4_8 : g_comp generic map (comp_kind => "eq", size => 4) port map (bitcnt_dout, x"8", comp4_8_dout);
---------
-- comp8_3
---------
u36_comp8_3 : g_comp generic map (comp_kind => "eq", size => 8) port map (cnt_dout, x"03", comp8_3_dout);
---------
-- comp8_4
---------
u37_comp8_4 : g_comp generic map (comp_kind => "eq", size => 8) port map (rlengthd_dout, x"00", comp8_4_dout);
---------
-- comp8_6
---------
u38_comp8_6 : g_comp generic map (comp_kind => "eq", size => 8) port map (br_dout, x"ff", comp8_6_dout);
---------
-- comp8_9
---------
u39_comp8_9 : g_comp generic map (comp_kind => "eq", size => 8) port map (shcnt_dout, rlengthd_dout, comp8_9_dout);
---------
-- comp8_10
---------
u40_comp8_10 : g_comp generic map (comp_kind => "eq", size => 8) port map (rt1_dout, x"00", comp8_10_dout);
---------
-- comp8_12
---------
u41_comp8_12 : g_comp generic map (comp_kind => "leq", size => 8) port map (br_dout, rmin_dout, comp8_12_dout);
---------
-- comp8_13
---------
u42_comp8_13 : g_comp generic map (comp_kind => "geq", size => 8) port map (br_dout, rmax_dout, comp8_13_dout);
---------
-- comp8_14
---------
u43_comp8_14 : g_comp generic map (comp_kind => "eq", size => 8) port map (rd_dout, x"00", comp8_14_dout);
---------
-- comp16_1
---------
u44_comp16_1 : g_comp generic map (comp_kind => "eq", size => 16) port map (cnt_m1_m3_dout, x"0000", comp16_1_dout);
---------
-- comp16_2
---------
u45_comp16_2 : g_comp generic map (comp_kind => "eq", size => 16) port map (cnt_m1_m3_dout, rfilelength_dout, comp16_2_dout);
---------
-- comp16_7
---------
u46_comp16_7 : g_comp generic map (comp_kind => "eq", size => 16) port map (cnt_elem_dout, relem_dout, comp16_7_dout);
---------
-- comp8_11
---------
u47_comp8_11 : g_comp_alu generic map (comp_kind => "eq", alu_kind => "sub", size => 8) port map (shcnt_dout, rlengthd_dout, x"01", comp8_11_dout);
---------
-- comp16_5
---------
u48_comp16_5 : g_comp_alu generic map (comp_kind => "eq", alu_kind => "sub", size => 16) port map (cnt_elem_dout, relem_dout, x"0001", comp16_5_dout);
---------
-- alu8_1
---------
u49_alu8_1 : alu_8bit port map (mux3_dout, mux5_dout, mux1_dout, alu8_1_dout);
---------
-- alu16_1
---------
u50_alu16_1 : alu_16bit port map (cnt_m1_m3_dout, relem_dout, "0010", alu16_1_dout);
-----------------------
-- Additional Signals
-----------------------
ctr_mux6 <= ctr_mux6_1 & ctr_mux6_0;
ctr_mux0 <= ctr_mux0_1 & ctr_mux0_0;
ctr_mux1 <= ctr_mux1_2 & ctr_mux1_1 & ctr_mux1_0;
ctr_mux3 <= ctr_mux3_2 & ctr_mux3_1 & ctr_mux3_0;
ctr_mux4 <= ctr_mux4_3 & ctr_mux4_2 & ctr_mux4_1 & ctr_mux4_0;
ctr_mux5 <= ctr_mux5_1 & ctr_mux5_0;
rbyte_din <= mux2_dout & mux0_dout;
rbyte_en <= rbyte_en_1 & rbyte_en_0;
clock <= clk;
ext_in <= mux4_dout;
rwrite2m3 <= cnt_m1_m3_dout;
end arc_dp;
-----------------------------------------------
configuration cfg_dp of dp is
for arc_dp
end for;
end cfg_dp;
-----------------------------