head 1.3; access; symbols rel_1_0:1.3 restruc2:1.2.0.4 restruc1:1.2.0.2; locks; strict; comment @# @; 1.3 date 2004.12.17.22.15.27; author ghutchis; state Exp; branches; next 1.2; 1.2 date 2004.11.03.21.13.27; author ghutchis; state Exp; branches; next 1.1; 1.1 date 2004.10.15.22.04.15; author ghutchis; state Exp; branches; next ; desc @@ 1.3 log @Added documentation of core area and the simple GMII interface block. @ text @ $Revision: 1.4 $: tv80 Core Documentation
 TOC 
$Revision: 1.4 $G. Hutchison
 OpenCores.org
 October 2004

tv80 Core Documentation

Abstract

A synthesizable 8-bit microprocessor which is instruction-set compatable with the Z80, targetted at embedded and system-on-a-chip designs.



Table of Contents

1.  Background
2.  Core Area and Technology Mapping
3.  TV80 Peripherals
    3.1  Simple GMII Interface
        3.1.1  Register Interface
4.  Verification Environment
    4.1  Memory Map
    4.2  Control Registers
        4.2.1  Simulation control (0x80)
        4.2.2  Message output (0x81)
        4.2.3  Timeout control (0x82)
        4.2.4  Max timeout (0x84, 0x83)
        4.2.5  Interrupt countdown (0x90)
        4.2.6  Checksum value (0x91)
        4.2.7  Checksum accumulate (0x92)
        4.2.8  Increment on read (0x93)
    4.3  Tool Chain
    4.4  Tests
        4.4.1  tvs80 test
5.  References
§  Author's Address




 TOC 

1. Background

The tv80 core was created as a Verilog port of the VHDL T80 coreWallner, D., VHDL T80 Core, .[1], for use as a maintenence processor inside an ASIC. The tv80 has been modified since then for better synthesis timing/area results, and to incorporate several bug-fixes.

The T80, and the tv80 derived from it, attempt to maintain the original cycle timings of the Z80, but have radically different internal designs and timings. With its target being ASIC and embedded applications, the tv80 does not attempt to maintain the original pinout of the Z80.



 TOC 

2. Core Area and Technology Mapping

This section tracks synthesis results in various technologies. LSI 10K technology is used as a baseline because the library ships with Design Compiler.

    Component         Clock Speed    Area     Technology (units)
    ================  ===========  ========  =====================
      tv80              33 Mhz     10733      lsi_10k (gates)
      simple_gmii       33 Mhz      1247      lsi_10k (gates)
  


 TOC 

3. TV80 Peripherals

The TV80 design includes a number (one, at this point) of peripherals. These peripherals are hardware-synthesizable, but may not be fully tested or functional.

3.1 Simple GMII Interface

This block presents a GMII interface on one side and a TV80 processor interface on the other. The processor-side controls are all mapped into I/O-space. The block can only process a single packet in each direction at one time. This is only really a limitation on the RX side, where any incoming packets will be dropped until the processor removes the first packet from the RX buffer.

The GMII interface is signalling only, and does not support 10/100 operation, half duplex mode, flow control, or any other aspects of 802.3.

3.1.1 Register Interface

This block consumes 3 bits of I/O address space. The register addresses below are relative to the configurable base address of the block, which must be aligned to an 8-byte boundary. Registers 0x6 and 0x7 are reserved.

3.1.1.1 Status Register (0x0)

Bit 0 of the status register indicates that a packet is available in the RX buffer. This bit will be cleared when the last byte of data is read out of the RX buffer.

Bit 1 is set when the packet in the TX buffer has finished transmitting. This bit will be cleared when the first byte of data of the next packet is written into the TX buffer.

This register is read-only.

3.1.1.2 Control Register (0x1)

Bit 0 controls sending packets. When a 1 is written to this bit, the data in the TX buffer will be sent as a single packet.

This register is write-only.

3.1.1.3 RX Length Register (Low, 0x2)

This register contains the low 8 bits of the length of the packet currently residing in the RX buffer.

This register is read-only.

3.1.1.4 RX Length Register (High, 0x3)

This register contains the high 8 bits of the length of the packet currently residing in the RX buffer.

This register is read-only.

3.1.1.5 RX Data Register (0x4)

This register contains the next byte of data in the RX packet buffer.

This register is read-only.

3.1.1.6 TX Data Register (0x5)

Writing to this register puts data in the TX packet buffer. This register does not perform bounds checking; it is the program's responsibility not to write more data than the size of the TX buffer.

This register is write-only.



 TOC 

4. Verification Environment

4.1 Memory Map

Environment memory space is divided into a 32k ROM region and a 32k RAM region, as follows:

  0000-7FFF:  ROM
  8000-FFFF:  RAM

Environment I/O space is allocated as follows:

  00-0F:  Unused
  10-1F:  Test devices
  20-7F:  Unused
  80-9F:  Environment control
  A0-FF:  Unused

4.2 Control Registers

4.2.1 Simulation control (0x80)

4.2.2 Message output (0x81)

Write characters to this port one at a time. When the newline ('\n', ASCII 0x0A) character is written, the environment will print out the collected string.

4.2.3 Timeout control (0x82)

Bit[0] enables the timeout counter, Bit[1] resets the counter to 0. Timeout counter defaults to enabled at simulation start.

4.2.4 Max timeout (0x84, 0x83)

Holds 16-bit timeout value (amount of time in clocks before timeout error occurs).

4.2.5 Interrupt countdown (0x90)

When set, starts a countdown (in clocks) until assertion of the INT_N signal.

4.2.6 Checksum value (0x91)

This register holds the checksum value of all data written to the accumulate register. The checksum is a simple twos-complement checksum, so it can be compared with a CPU-generated checksum.

This register is readable and writeable. Writing the register sets the current checksum value.

4.2.7 Checksum accumulate (0x92)

This write-only register adds the written value to the value contained in the Checksum Value register.

4.2.8 Increment on read (0x93)

This register increments every time it is read, so reading it repeatedly generates an incrementing sequence. It can be reset by writing it to a new starting value.

4.3 Tool Chain

The minimum toolchain required to simulate the tv80 is the CVerVanvick, A., GPL Cver Simulator, .[3] Verilog simulator, and the SDCC, Small Device C Compiler, .[2] compiler/assembler/linker. In addition, to run the tvs80tvs80 test instruction test suite, the DOSBox, DOSBox, .[4] DOS emulator is required.

4.4 Tests

Most of the tests in the tv80 environment are written in C, and should be compiled with the sdcc, Small Device C Compiler, .[2] compiler.

4.4.1 tvs80 test

The tvs80 test is different than the rest of the tests, and is written in its own flavor of assembly language. This test provides a fairly comprehensive Z80 instruction test.

The assembler for this test only runs under DOS. To assemble under Unix/Linux, the "dosbox" DOS emulator, DOSBox, .[4] is required. A script to run the assembler under dosbox, as well as the tvs80.asm source, is checked in under the "tests/tvs80" directory.



 TOC 

5 References

[1] Wallner, D., "VHDL T80 Core".
[2] "Small Device C Compiler".
[3] Vanvick, A., "GPL Cver Simulator".
[4] "DOSBox".


 TOC 

Author's Address

  Guy Hutchison
  OpenCores.org
EMail:  ghutchis@@opencores.org
@ 1.2 log @Updated IO registers to add checksum and increment-on-read registers used for testing block I/O instructions. @ text @d2 2 a3 2 $Revision: 1.3 $: tv80 Core Documentation d112 1 a112 1 $Revision: 1.3 $G. Hutchison d130 8 d139 1 a139 1     2.1  d141 1 a141 1     2.2  d143 1 a143 1         2.2.1  d145 1 a145 1         2.2.2  d147 1 a147 1         2.2.3  d149 1 a149 1         2.2.4  d151 1 a151 1         2.2.5  d153 1 a153 1         2.2.6  d155 1 a155 1         2.2.7  d157 1 a157 1         2.2.8  d159 1 a159 1     2.3  d161 1 a161 1     2.4  d163 1 a163 1         2.4.1  d165 1 a165 1 3.  d188 1 a188 1

2. Verification Environment

d190 84 a273 1

2.1 Memory Map

d296 1 a296 1

2.2 Control Registers

d298 1 a298 1

2.2.1 Simulation control (0x80)

d310 1 a310 1

2.2.2 Message output (0x81)

d318 1 a318 1

2.2.3 Timeout control (0x82)

d326 1 a326 1

2.2.4 Max timeout (0x84, 0x83)

d333 1 a333 1

2.2.5 Interrupt countdown (0x90)

d340 1 a340 1

2.2.6 Checksum value (0x91)

d350 1 a350 1

2.2.7 Checksum accumulate (0x92)

d355 1 a355 1

2.2.8 Increment on read (0x93)

d361 1 a361 1

2.3 Tool Chain

d371 1 a371 1

2.4 Tests

d377 1 a377 1

2.4.1 tvs80 test

d390 1 a390 1

3 References

@ 1.1 log @Added HTML version of docs @ text @d3 1 a3 1 d114 1 a114 1  October 15, 2004 d145 7 a151 1     2.3  d153 1 a153 1     2.4  d249 22 a270 1

2.3 Tool Chain

d280 1 a280 1

2.4 Tests

@