This is useful for printing strings to the VDU and UART
Constants ROM
256-byte (max)
Null-terminated strings
ROM "assembler" creates .MIF file and Symbol table
8-bit Address Counter
Loadable with start address
Auto-increment address
Programming
Single address from the IOP Peripheral spave
Load transfer start address (W)
Read Data (R)
Hook-up
Add to Top Level VHDL code
Pins
None - all internal
Signals
-- Decodes/Strobes
...
signal w_ldConAdr : std_logic;
signal w_rdConAdr : std_logic;
...
-- Interfaces
...
signal w_ConstsData : std_logic_vector(7 downto 0);
VHDL Instance
Add this entity instance code to the IOP16 top file
-- Constants Unit
CONST_UNIT : entity work.ConstantsUnit
port map (
i_clock => i_clk, -- 50 MHz clock
i_dataIn => w_periphOut, -- Data from IOP CPU
i_ldStr => w_ldConAdr, -- Write load address strobe
i_rdStr => w_rdConAdr, -- Strobe to read data from ROM
o_constData => w_ConstsData -- Data from ROM
);
Hook-up Strobes/Read Mux
Strobes
-- Add Strobes/Selects
..
w_ldConAdr <= '1' when (w_periphAdr=x"0E") and (w_periphWr = '1') else '0';
w_rdConAdr <= '1' when (w_periphAdr=x"0E") and (w_periphRd = '1') else '0';
...
Add to Read Mux
-- Peripheral bus read mux
w_periphIn <= ...
w_ConstsData when w_periphAdr = x"0E" else -- Read Constants ROM
...