簡易CPU仕様案

by K.I
2000/12/13

Index


概要

シーケンサとしての利用を想定した、簡易的なCPUの仕様案。

特徴


[top]

Block Diagram


[top]

Timing Chart

1cycle = 20clock
[top]

クロックジェネレータ

5bitジョンソンカウンタによるステートマシンでクロックを生成する。1 Fetch/Executeの切替えは1bitのバイナリカウンタによって保持。
F 43210
1 00000 F0 pre-fetch
1 00001 F1 fetch
1 00011 F2
1 00111 F3
1 01111 F4
1 11111 F5
1 11110 F6
1 11100 F7
1 11000 F8
1 10000 F9 post-fetch
0 00000 E0 pre-execute
0 00001 E1 execute
0 00011 E2
0 00111 E3
0 01111 E4
0 11111 E5
0 11110 E6
0 11100 E7
0 11000 E8
0 10000 E9 post-execute

1クロック生成の容易さから、ジョンソンカウンタを採用した。

[top]

Command Set

8bitインストラクションのRISC形式のコマンドセット2
hex binary mnemonic operation cz
00 0000 0000 nop No Operation xx
01 0000 0001 inv Invert 01
02 0000 0010 inc Increment **
03 0000 0011 dec Decrement **
04 0000 0100 ret Return Subroutine xx
05 0000 0101 inp Input xx
06 0000 0110 out Output xx
07 0000 0111 ---
08 0000 1000 skp z Skip if Zero xx
09 0000 1001 skp nz Skip if not Zero xx
0A 0000 1010 skp c Skip if Carry xx
0B 0000 1011 skp nc Skip if not Carry xx
0C 0000 1100 ret i Return Interrupt xx
0D 0000 1101 set z Set Zero 01
0E 0000 1110 set c Set Carry 1*
0F 0000 1111 hlt CPU Halt xx
1x 0001 aaaa ld aaaa Load 01
2x 0010 aaaa st aaaa Store 01
3x 0011 0bbb sft bbb Shift right 0*
3x 0011 1bbb rot bbb Rotate right 0*
4x 0100 kkkk bnk kkkk Change Bank xx
5x 0101 aaaa jps aaaa Jump Subroutine xx
6x 0110 aaaa --- jps reserve
7x 0111 aaaa jp aaaa Jump xx
8x 1000 iiii swap iiii swap I/O & set I/O bankxx
9x 1001 0rrr jr rrr Jump Relative Forword xx
9x 1001 1rrr jr -rrr Jump Relative Back xx
Ax 1010 aaaa add aaaa Add **
Bx 1011 aaaa sub aaaa Sub **
Cx 1100 aaaa and aaaa And 0*
Dx 1101 aaaa or aaaa OR 0*
Ex 1110 0bbb clr bbb Clear bit 01
Ex 1110 1bbb set bbb Set bit 01
Fx 1111 0bbb skp0 bbb Skip if bit=0 0*
Fx 1111 1bbb skp1 bbb Skip if bit=1 0*
        aaaa:   4bit address
        kkkk:   4bit bank address
        iiii:   4bit I/O bank
        bbb:    bit location or shift count
        rrr:    ±8 relative value

        flag    x: no change, *: change, 0: low, 1: high

2確定ではない。特にI/O関係は未定。

[top]

その他

以下は未定。

リセット回路の案

I/Oについて

割り込みについて

その他の案


[top] [電子工作関連に戻る]

comments powered by Disqus