H
H. Peter Anvin
Guest
Followup to: <6Uasb.123195$mZ5.829826@attbi_s54>
By author: "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu>
In newsgroup: comp.arch.fpga
require a lot more logic than necessary.
This below is my design notes for my hacked-up architecture, currently
called "NanoRISC."
I have no way to know how this is turning out. My current goal is to
make sure it implements in < 1000 LEs on Cyclone, without using
blockRAM for the register file. Fundamentally it's a personal
research hack project.
-hpa
NanoRISC goals
- Minimal hardware consumption
- Technology independent
- Free licensing
-> 16-bit addressing, data width, instruction word
-> Single issue in-order RISC
-> Short pipeline (probably 3 stages)
-> Deterministic timing (1 cycle/insn, taken branch 2 cycles?)
-> Separate ports for I and D to take advantage of dual-port RAM
0000 NNNN NNNN NNNN - IMM (supplies upper 12 bits of q or Is field)
0001 0000 SSSS DDDD - JMP Rd,Rs (PC <- Rd, Rd <- Rs)
0001 CCCC TTTT TTTT - BR cc,PC+t (cc != 0)
001I PPPP SSSS DDDD - ALU Rd,Rs/Is (P = operation, I = immediate)
01WB QQQQ BBBB RRRR - LD/ST Rr,[Rb+q] (W=ST/LD# B=16/8#)
1TTT TTTT TTTT TTTT - CALL PC+t (PC <- PC+2, r15 <- PC, PC <- PC+t)
ALU opcodes
0000 UNARY
1000 ROR
1001 ROL
1010 RCR
1011 RCL
1100 SHR
1101 SHL
1110 SAR
1111 SXL Shift left insert 1
[...more...]
0001 MOV
0010 CMP
0011 TST
0100 ANDN
0101 OR
0110 XOR
0111 AND
1000 ADD
1001 ADC
1010 SUB
1011 SBC
1100 SUBR
1101 SBCR
1110 WRSR
1111 RDSR
Condition codes
3 N = negative
2 Z = zero
1 V = overflow
0 C = carry
#e - Z
#b - ~C
#a - C & ~Z
#l - V
#g - ~V & ~Z
#s - N
+ negations
always - negation of code 0000
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
By author: "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu>
In newsgroup: comp.arch.fpga
The PDP-11 is still very much a CISC archtecture... I think it wouldThe PDP-11 has a nice simple 16 bit architecture, not including the optional
instructions. (FIS and EIS for example.)
require a lot more logic than necessary.
This below is my design notes for my hacked-up architecture, currently
called "NanoRISC."
I have no way to know how this is turning out. My current goal is to
make sure it implements in < 1000 LEs on Cyclone, without using
blockRAM for the register file. Fundamentally it's a personal
research hack project.
-hpa
NanoRISC goals
- Minimal hardware consumption
- Technology independent
- Free licensing
-> 16-bit addressing, data width, instruction word
-> Single issue in-order RISC
-> Short pipeline (probably 3 stages)
-> Deterministic timing (1 cycle/insn, taken branch 2 cycles?)
-> Separate ports for I and D to take advantage of dual-port RAM
0000 NNNN NNNN NNNN - IMM (supplies upper 12 bits of q or Is field)
0001 0000 SSSS DDDD - JMP Rd,Rs (PC <- Rd, Rd <- Rs)
0001 CCCC TTTT TTTT - BR cc,PC+t (cc != 0)
001I PPPP SSSS DDDD - ALU Rd,Rs/Is (P = operation, I = immediate)
01WB QQQQ BBBB RRRR - LD/ST Rr,[Rb+q] (W=ST/LD# B=16/8#)
1TTT TTTT TTTT TTTT - CALL PC+t (PC <- PC+2, r15 <- PC, PC <- PC+t)
ALU opcodes
0000 UNARY
1000 ROR
1001 ROL
1010 RCR
1011 RCL
1100 SHR
1101 SHL
1110 SAR
1111 SXL Shift left insert 1
[...more...]
0001 MOV
0010 CMP
0011 TST
0100 ANDN
0101 OR
0110 XOR
0111 AND
1000 ADD
1001 ADC
1010 SUB
1011 SBC
1100 SUBR
1101 SBCR
1110 WRSR
1111 RDSR
Condition codes
3 N = negative
2 Z = zero
1 V = overflow
0 C = carry
#e - Z
#b - ~C
#a - C & ~Z
#l - V
#g - ~V & ~Z
#s - N
+ negations
always - negation of code 0000
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64