OpenCores
URL https://opencores.org/ocsvn/zipcpu/zipcpu/trunk

Subversion Repositories zipcpu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /zipcpu/trunk/doc
    from Rev 209 to Rev 202
    Reverse comparison

Rev 209 → Rev 202

/.gitignore File deleted
/orconf2017.pdf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
orconf2017.pdf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: orconf2018.pdf =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: orconf2018.pdf =================================================================== --- orconf2018.pdf (revision 209) +++ orconf2018.pdf (nonexistent)
orconf2018.pdf Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: gfx/.gitignore =================================================================== --- gfx/.gitignore (revision 209) +++ gfx/.gitignore (nonexistent) @@ -1,4 +0,0 @@ -Makefile -inkscape-notes.txt -bus-structure.eps -topng.sh Index: gfx/cpu.dia =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: nextgen.html =================================================================== --- nextgen.html (revision 209) +++ nextgen.html (revision 202) @@ -1,7 +1,136 @@ -ZipCPU ISA - CheatSheet -

Zip CPU ISA -CheatSheet

+Next Generation ZipCPU ISA +

Next Generation Zip CPU ISA

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
31      27      23      19      15      11      7      3     0CCExtra
1'Zip 3'Cond 
0Any000AlwaysY
001Less-ThanN
010On Zero
011Not Zero
100Greater Than
101Greater Than/Equal
110On Carry (unsigned overflow)
111On (signed) oVerflow
04'Reg5'OpCodCond19'Op-BCC
Reg0xxxxAnyALU operation(y)
 018-bit Immediate 
1B-Reg14-bit Immediate
Reg0100102'hxLDI(HI/LO), 16-bit ImmN
Reg01111ARRegBRMove, 13-bit ImmN
Reg1000xCompare/Test (ALU)Y
Reg1001wMemory operation, w=write, Op-B=addressN
Reg1010xIDIV(U/S), RA=RA/(RB+Imm), uses alt-AY
3'h7 11000NOOPN
11001Break
11010Bus Lock
Reg11fffFloating Point operationY
Reg1011Load Immediate (23 bit Immediate, unconditional)N
1Anyx00Always 
01Less Than
10On Zero
11Not Zero
112'bxxApply condition to second half
14'Reg5'OpCodAny04'Imm4'Reg5'OpCod04'Imm
14'Reg14'Reg
-

+ +

+ + + + + + + + + + + + + + + + + + +
ALU OperationCC
A-0000SUB (Pairs w/ CMP)Y
A-0001AND (Pairs w/ OR, and TST)
A-0010ADD (Pairs w/ SUB)
A-0011OR (Pairs w/ AND)
A-0100XOR
A-0101LSR
A-0110LSL (Pairs w/ ROL)
A-0111ASR (Pairs w/ LSR)
A-1000MPYN  Y
A-1001LDILON
A-1010MPYUHIY
A-1011MPYSHI
A-1100BREVY  N
A-1101POPC MOVY N
A-1110ROL LB
A-1111MOV SBN
+ +

+ + + + + + + + + +
FP OperationCC
F-000FPADDFloating point AddY
F-001FPSUBFloating point Subtract & Compare
F-010FPMPYFloating point multiply
F-011FPDIVFloating point divide
F-100FPI2FConvert to floating point
F-101FPF2IConvert to integer
F-110LHLoad Word
F-111SHStore Word
+ +

+ + + + + + + + + + + + + + + + +
00000SUB 10000CMP
00001AND 10001TEST
00010ADD 10010LOD
00011OR 10011STO
00100XOR10100DIVU
00101LSR10101DIVS
00110LSL10110LDI
00111ASR10111
01000MPY11000FPADD
01001LDILO11001FPSUB
01010MPYUHI11010FPMPY
01011MPYSHI11011FPDIV
01100BREV11100FPI2F
01101MOV11101FPF2I
01110LB11110LH
01111SB11111SH
+
+

+

Proposed instruction set change

+ +
@@ -11,12 +140,8 @@ - + - - - - @@ -25,7 +150,6 @@
31       27      11       7       3     0
04'DR5'OpCode3'Cond018'Immediate
04'DR5'OpCode3'Cond018'Immediate
1B-Reg14'Immediate
4'DRMOV3'CondAB-RegB13'Immediate
4'DRLDI23'Immediate
14'DR 3'OpCodeA 7'Op-B

- @@ -34,37 +158,29 @@ - + - + - - - - + + + +
Normal instructionsCompressed
00000SUB 10000CMP000SUB
00001AND 10001TEST001AND
00010ADD 10010LW010ADD
00101LSR10101SH101SW
00110LSL10110LB110LDI
00111ASR10111SB111MOV
01000BREV11000LDIReserved for FPU
01000BREV11000LDI
01001LDILO11001
01010MPYUHISpecial Insn11010FPADD
01010MPYUHI11010FPADD
01011MPYSHI11011FPSUB
01100MPY11100BREAK11100FPMPY
01101MOV11101LOCK11101FPDIV
01110DIVU11110SIM11110FPI2F
01111DIVS11111NOOP11111FPF2I
01100MPY11100FPMPY11100BREAK
01101MOV11101FPDIV11101LOCK
01110DIVU11110FPI2F11110SIM
01111DIVS11111FPF2I11111NOOP
-

ASSEMBLER SUPPORTED DERIVED INSTRUCTIONS

- - - - - - - - - - -
SourceDerived Instructions
ADDBRA, BLT, BZ, BC, BV, BGE, BNZ, BNC, BUSY
ORRTU, WAIT, HALT, STEP
ANDTRAP
XORNOT
MOV(Indirect) JMP, RETN
LWLJMP
BREVCLR
MultipleJSR, LJSR, NEG, SEXTH, SEXTB
- -

COMPRESSED INSTRUCTION SET (CIS) EXCEPTIONS

-

The CIS LDI instruction uses an 8'bit signed immediate, not 7-bit (-128 to 127). +

VLIW

+

The VLIW instructions take 3-bits only for their opcode. They are designed +to use only the most used opcodes. +

LDI will use all opcode bits, and the immediate field will be dedicated to + its immediate, allowing us to load any 8-bit signed constant + (-128 to 127).

MOV will use all opcode bits, and the extra bit selecting reg/imm will be extended to be an immediate bit, so that we can have any 4'bit register offset (-8 to 7) -

To make this more usable, the compressed LW/SW instructions will assume the - register is SP if no register is given. This will allow compressed - accesses to stack offsets by between -64 to 63. +

To make this more usable, the LOD/STO instructions will assume the register + is SP if no register is given. This will allow us to offset the stack + by anything between -64 to 63. Useful enough to get just about + anything.

SIM Codes

SIM and NOOP instructions are both 32-bit instructions, and both take an 18-bit immediate. @@ -74,14 +190,34 @@ simulation (if the CPU is run within a simulation). The CPU will create an illegal instruction on any SIM opcode outside of the simulator, and ignore any NOOP instruction--no matter what - the immediate value. + the immediate. Particular immediate values include:

    -
  1. OUT/SOUT: -
  2. NEXIT/SEXIT: with an 8-bit (signed) exit code +
  3. SIMEXIT: with an 8-bit (signed) exit code
  4. SIMNOOP: useful for testing if the simulator is present. Will cause an ILLegal instruction if the simulator is not present, but ignored otherwise. This will be the immediate value of zero. -
  5. NDUMP/SDUMP: dump the CPU state (all the registers) to the output +
  6. SIMDUMP: dump the CPU state (all the registers) to the output +
  7. (Console read/write can be done via UART, so not necessary here.)
+

8-bit bytes

+

This particular change is designed to create support for 8-bit bytes. + Specifically, we added support for LH, SH, LB, and SB instructions + (Load and store 16-bits, or load and store 8-bits.) +

As a consequence, the bottom 2-bits of any address no longer traverse the + bus. +

Together

+While the VLIW instruction set works well without this change, this +change renders the 3'bit register offsets difficult to use. Two examples: +
    +
  1. The original VLIW allowed a JSR instruction: MOV 1(PC),R0, LOD(PC),PC. The + new version would need to be replaced with MOV 4(PC),R0 and LOD(PC),PC, + but 4 doesn't fit in 3-signed bits. +
  2. Further, a 3'bit offset to a LOD or STO instruction makes no sense. +
+ +
/spec.pdf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
/src/spec.tex
3674,7 → 3674,8
instruction set has demonstrated an amazing versatility. I will contend
therefore and for anyone who will listen, that this instruction set
offers a full and complete capability for whatever a user might wish
to do with the only exception being accelerated floating-point support.
to do with two exceptions: bytewise character access and accelerated
floating-point support.
\item The burst load/store approach using the wishbone pipelining mode is
novel, and can be used to greatly increase the speed of the processor.
\item The novel approach to interrupts greatly facilitates the development of
3688,6 → 3689,17
At the same time, if most modern systems handle interrupt vectoring in
software anyway, why maintain complicated hardware support for it?
 
\item My goal of a high rate of instructions per clock may not be the proper
measure of this CPU. For example, if instructions are being read from a
SPI flash device, such as is common among FPGA implementations, these
same instructions may suffer stalls of between 64 and 128 cycles per
instruction just to read the instruction from the flash. Executing the
instruction in a single clock cycle is no longer the appropriate
measure. At the same time, it should be possible to use the DMA
peripheral to copy instructions from the FLASH to a temporary memory
location, after which they may be executed at a single instruction
cycle per access again.
 
\item Both GCC and binutils back ends exist for the ZipCPU.
\item As of this version of the CPU, a newlib veresion of the C--library
now exists.
/orconf.pdf Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.