Project uses my custom I/O Processor (IOP16). The I/O Processor is detailed here.

IOP16 Memory Map

There are three devices which are all memory mapped from the IOP16.

  • 0X00 - UART (c/S) (r/w)
  • 0X01 - UART (Data) (r/w)
  • 0X02 - DISPLAY (c/S) (w)
  • 0X03 - DISPLAY (Data) (w)
  • 0X04 - KBD (c/S) (r)
  • 0X05 - KBD (Data) (r)

I/O Device programming

All three resources have a 6850 style interface.

  • The first location is the status value.
  • The second location is the data value.
  • The receive data present bit is the D0 bit and is '1' when data is present.

FPGA Resources

The memory resources can be reduced somewhat.

The character set can be reduced from 256 to 128 characters. This is controlled from the EXTENDED_CHARSET generic for the instance in the top.

    -- ANSI Display
    -- Resource usage can be reduced by changing the generics below
    ANSIDisplay: entity work.ANSIDisplayVGA    
    generic map    (
        EXTENDED_CHARSET     => 0,    -- 1 = 256 chars, 0 = 128 chars
        COLOUR_ATTS_ENABLED    => 1,    -- 1 = Color for each character, 0 = Color applied to whole display
        DEFAULT_ATT        => "00001111", -- background iBGR | foreground iBGR (i=intensity)
        ANSI_DEFAULT_ATT    => "00000111",    -- background iBGR | foreground iBGR (i=intensity)
        SANS_SERIF_FONT        => 0                -- 0 => use conventional CGA font, 1 => use san serif font
        )

The IOP16 code size can set from the IOP16 generic. For the ANSI terminal the code can be as small as 256 bytes. The EP4CE15 has 1KB blocks increments.

    -- I/O Processor
    IOP16: ENTITY work.IOP16
    generic map     ( 
        INST_SRAM_SIZE_PASS    => 256
    )

 IOP Code

000    START   0x6004    IOR    Reg0    IO_04    READ KBD STATUS    
001            0x8001    ARI    Reg0    0X01     MASK RX DATA PRESENT BIT    
002            0xC003    BEZ    SKIP1            NO KBD DATA    
003            0x6005    IOR    Reg0    IO_05    READ KBD DATA    
004            0x7001    IOW    Reg0    IO_01    WRITE TO UART DATA    
005    SKIP1   0x6000    IOR    Reg0    IO_00    READ UART STATUS    
006            0x8001    ARI    Reg0    0X01     MASK RX DATA PRESENT BIT    
007            0xC003    BEZ    SKIP2            NO UART DATA    
008            0x6001    IOR    Reg0    IO_01    READ UART DATA    
009            0x7003    IOW    Reg0    IO_03    WRITE OUT SCREEN    
00a    SKIP2   0xE000    JMP    START                    

ANSI Terminal Build GitHub repo is here.