IOP16 Constants Unit

From Land Boards Wiki
Jump to navigation Jump to search

Constants ROM with Address Counter

A constants ROM used to store strings. This is useful for printing strings to the VDU and UART.

  • Constants ROM
    • 256-byte (max)
    • Null terminated strings
    • ROM "assembler" creates .MIF file
  • 8-bit Address Counter
    • Loadable with start address
    • Auto-increment address

Programming

  • Single address from the IOP Peripheral spave
  • Load 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

-- Constants Unit
CONST_UNIT : entity work.ConstantsUnit
port map (	
  i_clock     => i_clk,
  i_dataIn    => w_periphOut,
  i_ldStr     => w_ldConAdr,
  i_rdStr     => w_rdConAdr,
  o_constData => w_ConstsData
);

Hook-up Strobes/Read Mux

  • Add to strobes and read mux
-- 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';
...

Constants Compiler

Creates two output files

    • Cross reference list of LABEL, address
    • .MIF file with ROM contents
      • Load ROM file by double-clickjng ConstantsROM_256B below ConstantsUnit
  • Input file is CSV
    • Header line - ['LABEL','STRING']

Resources

  • Logic Cells: 74
  • Registers: 46
  • Memory Bits: 2048
  • M9Ks: 1