Skip to content

Instantly share code, notes, and snippets.

@afmika
Created September 23, 2021 18:42
Show Gist options
  • Save afmika/c7b7697aac20d0660a3c536a289b8d64 to your computer and use it in GitHub Desktop.
Save afmika/c7b7697aac20d0660a3c536a289b8d64 to your computer and use it in GitHub Desktop.
A minimalistic CPU designed to display every Rina-chan board
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project source="2.7.1" version="1.0">
This file is intended to be loaded by Logisim (http://www.cburch.com/logisim/).
<lib desc="#Wiring" name="0"/>
<lib desc="#Gates" name="1"/>
<lib desc="#Plexers" name="2"/>
<lib desc="#Arithmetic" name="3"/>
<lib desc="#Memory" name="4">
<tool name="ROM">
<a name="contents">addr/data: 8 8
0
</a>
</tool>
</lib>
<lib desc="#I/O" name="5"/>
<lib desc="#Base" name="6">
<tool name="Text Tool">
<a name="text" val=""/>
<a name="font" val="SansSerif plain 12"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
</lib>
<main name="main"/>
<options>
<a name="gateUndefined" val="ignore"/>
<a name="simlimit" val="1000"/>
<a name="simrand" val="0"/>
</options>
<mappings>
<tool lib="6" map="Button2" name="Menu Tool"/>
<tool lib="6" map="Button3" name="Menu Tool"/>
<tool lib="6" map="Ctrl Button1" name="Menu Tool"/>
</mappings>
<toolbar>
<tool lib="6" name="Poke Tool"/>
<tool lib="6" name="Edit Tool"/>
<tool lib="6" name="Text Tool">
<a name="text" val=""/>
<a name="font" val="SansSerif plain 12"/>
<a name="halign" val="center"/>
<a name="valign" val="base"/>
</tool>
<sep/>
<tool lib="0" name="Pin">
<a name="tristate" val="false"/>
</tool>
<tool lib="0" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="labelloc" val="east"/>
</tool>
<tool lib="1" name="NOT Gate"/>
<tool lib="1" name="AND Gate"/>
<tool lib="1" name="OR Gate"/>
</toolbar>
<circuit name="main">
<a name="circuit" val="main"/>
<a name="clabel" val=""/>
<a name="clabelup" val="east"/>
<a name="clabelfont" val="SansSerif plain 12"/>
<wire from="(690,210)" to="(690,220)"/>
<wire from="(100,100)" to="(100,110)"/>
<wire from="(330,220)" to="(330,420)"/>
<wire from="(150,90)" to="(150,230)"/>
<wire from="(80,80)" to="(80,350)"/>
<wire from="(580,310)" to="(620,310)"/>
<wire from="(650,360)" to="(760,360)"/>
<wire from="(590,240)" to="(590,450)"/>
<wire from="(280,210)" to="(320,210)"/>
<wire from="(620,90)" to="(640,90)"/>
<wire from="(430,140)" to="(640,140)"/>
<wire from="(660,240)" to="(690,240)"/>
<wire from="(450,200)" to="(470,200)"/>
<wire from="(720,220)" to="(720,380)"/>
<wire from="(150,460)" to="(170,460)"/>
<wire from="(380,340)" to="(530,340)"/>
<wire from="(420,460)" to="(430,460)"/>
<wire from="(650,240)" to="(650,360)"/>
<wire from="(310,190)" to="(320,190)"/>
<wire from="(330,420)" to="(660,420)"/>
<wire from="(70,110)" to="(70,420)"/>
<wire from="(460,160)" to="(540,160)"/>
<wire from="(80,80)" to="(90,80)"/>
<wire from="(760,360)" to="(760,420)"/>
<wire from="(780,340)" to="(780,400)"/>
<wire from="(720,400)" to="(720,450)"/>
<wire from="(220,300)" to="(420,300)"/>
<wire from="(760,420)" to="(840,420)"/>
<wire from="(70,420)" to="(330,420)"/>
<wire from="(840,410)" to="(840,420)"/>
<wire from="(150,80)" to="(150,90)"/>
<wire from="(220,90)" to="(220,230)"/>
<wire from="(150,250)" to="(150,460)"/>
<wire from="(280,210)" to="(280,230)"/>
<wire from="(350,30)" to="(650,30)"/>
<wire from="(420,350)" to="(420,380)"/>
<wire from="(660,340)" to="(660,420)"/>
<wire from="(310,160)" to="(310,190)"/>
<wire from="(460,310)" to="(560,310)"/>
<wire from="(380,320)" to="(420,320)"/>
<wire from="(370,190)" to="(410,190)"/>
<wire from="(690,220)" to="(690,240)"/>
<wire from="(620,310)" to="(620,350)"/>
<wire from="(290,200)" to="(320,200)"/>
<wire from="(370,240)" to="(400,240)"/>
<wire from="(310,160)" to="(320,160)"/>
<wire from="(220,90)" to="(300,90)"/>
<wire from="(300,90)" to="(380,90)"/>
<wire from="(660,330)" to="(790,330)"/>
<wire from="(70,40)" to="(80,40)"/>
<wire from="(300,30)" to="(300,90)"/>
<wire from="(290,140)" to="(290,200)"/>
<wire from="(640,90)" to="(640,140)"/>
<wire from="(690,100)" to="(700,100)"/>
<wire from="(680,210)" to="(690,210)"/>
<wire from="(720,450)" to="(730,450)"/>
<wire from="(420,350)" to="(620,350)"/>
<wire from="(660,340)" to="(780,340)"/>
<wire from="(780,400)" to="(830,400)"/>
<wire from="(540,240)" to="(590,240)"/>
<wire from="(70,40)" to="(70,110)"/>
<wire from="(590,240)" to="(650,240)"/>
<wire from="(370,190)" to="(370,200)"/>
<wire from="(280,260)" to="(280,280)"/>
<wire from="(380,320)" to="(380,340)"/>
<wire from="(460,160)" to="(460,190)"/>
<wire from="(1040,90)" to="(1040,170)"/>
<wire from="(630,170)" to="(630,210)"/>
<wire from="(70,110)" to="(100,110)"/>
<wire from="(120,80)" to="(150,80)"/>
<wire from="(350,200)" to="(370,200)"/>
<wire from="(440,250)" to="(460,250)"/>
<wire from="(510,200)" to="(530,200)"/>
<wire from="(390,170)" to="(390,210)"/>
<wire from="(450,190)" to="(460,190)"/>
<wire from="(790,330)" to="(790,390)"/>
<wire from="(60,40)" to="(70,40)"/>
<wire from="(1030,90)" to="(1040,90)"/>
<wire from="(420,400)" to="(420,460)"/>
<wire from="(650,30)" to="(650,80)"/>
<wire from="(810,90)" to="(890,90)"/>
<wire from="(630,210)" to="(640,210)"/>
<wire from="(590,450)" to="(600,450)"/>
<wire from="(740,90)" to="(790,90)"/>
<wire from="(650,80)" to="(700,80)"/>
<wire from="(280,280)" to="(460,280)"/>
<wire from="(290,140)" to="(410,140)"/>
<wire from="(660,240)" to="(660,330)"/>
<wire from="(790,390)" to="(830,390)"/>
<wire from="(810,170)" to="(1040,170)"/>
<wire from="(540,160)" to="(540,240)"/>
<wire from="(460,250)" to="(460,280)"/>
<wire from="(300,30)" to="(330,30)"/>
<wire from="(690,220)" to="(720,220)"/>
<wire from="(630,170)" to="(790,170)"/>
<wire from="(390,210)" to="(410,210)"/>
<wire from="(80,350)" to="(420,350)"/>
<wire from="(370,200)" to="(370,240)"/>
<wire from="(390,260)" to="(400,260)"/>
<wire from="(220,250)" to="(220,300)"/>
<wire from="(380,170)" to="(390,170)"/>
<wire from="(530,280)" to="(530,340)"/>
<wire from="(530,200)" to="(530,260)"/>
<wire from="(400,90)" to="(480,90)"/>
<wire from="(150,90)" to="(220,90)"/>
<comp lib="6" loc="(941,43)" name="Text">
<a name="text" val="Rom 2 (raw datas)"/>
</comp>
<comp lib="1" loc="(420,400)" name="Buffer">
<a name="facing" val="south"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(680,210)" name="Bit Extender">
<a name="in_width" val="16"/>
<a name="out_width" val="7"/>
</comp>
<comp lib="1" loc="(720,400)" name="Buffer">
<a name="facing" val="south"/>
<a name="width" val="7"/>
</comp>
<comp lib="0" loc="(170,460)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="16"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(390,260)" name="Constant">
<a name="width" val="16"/>
<a name="value" val="0x0"/>
</comp>
<comp lib="3" loc="(460,310)" name="Adder">
<a name="width" val="16"/>
</comp>
<comp lib="4" loc="(350,200)" name="Counter">
<a name="width" val="16"/>
<a name="max" val="0xffff"/>
</comp>
<comp lib="1" loc="(790,170)" name="Buffer">
<a name="facing" val="west"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(600,450)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="6" loc="(497,535)" name="Text">
<a name="text" val="Rina-chan because... ptr &lt;- ptr + isEq * 1~ ptr + isEq &amp; {(1)&amp;0x1}"/>
</comp>
<comp lib="1" loc="(280,230)" name="NOT Gate">
<a name="facing" val="north"/>
</comp>
<comp lib="0" loc="(80,40)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="0" loc="(690,100)" name="Constant">
<a name="width" val="16"/>
</comp>
<comp lib="1" loc="(530,280)" name="Buffer">
<a name="facing" val="south"/>
<a name="width" val="16"/>
</comp>
<comp lib="3" loc="(740,90)" name="Subtractor">
<a name="width" val="16"/>
</comp>
<comp lib="4" loc="(1030,90)" name="ROM">
<a name="addrWidth" val="16"/>
<a name="dataWidth" val="16"/>
<a name="contents">addr/data: 16 16
20 4d a 20 4d 20 4d 20
a 20 4d 20 4d 20 a 20
4d 20 4d 20 a 20 4d 20
4d a 20 a 4d 20 4d 20
4d 20 4d a 20 4d 20 a
20 4d 20 4d 20 a 20 4d
20 4d 20 a 20 4d 20 4d
20 a 20 4d 20 a 20 52
69 6e 61 2d 63 68 61 6e
20 42 6f 61 72 64 21 20
a 20 a 4d 20 4d a 20
4d 20 4d 20 a 20 4d 20
4d 20 a 20 4d 20 4d 20
a 4d 20 4d a 20 a 4d
20 4d 20 4d 20 4d a 20
4d 20 a 20 4d 20 4d 20
a 20 4d 20 4d 20 a 20
4d 20 4d 20 a 20 4d 20
a 20 6e 69 63 6f 72 69
6e 20 a 20 a 20 4d 20
4d 20 a 20 4d 20 4d 20
4d 20 a 20 4d 20 4d 20
a 20 4d 20 4d 20 a 20
4d 20 4d 20 a 20 a 20
4d 20 4d 20 a 20 a 20
4d 20 4d 20 a 20 4d 20
4d 20 4d 20 a 20 4d 20
4d 20 a 20 4d 20 4d 20
4d 20 a 20 4d 20 4d 20
a 20 75 77 61 20 3f 20
a 20 a 4d 20 4d 20 4d
20 4d a 4d 20 4d 20 4d
20 4d a 4d 20 4d 20 4d
20 4d a 4d 20 4d 20 4d
20 4d a 4d 20 4d 20 4d
20 4d a 20 4d 20 4d 20
a 20 a 20 4d 20 4d 20
4d 20 4d 20 a 20 4d 20
4d 20 4d 20 4d a 20 a
20 4d 20 4d 20 a 20 4d
20 4d 20 4d 20 a 20 4d
20 4d 20 a 52 69 6e 61
2d 63 68 61 6e 20 42 6f
61 72 64 20 55 77 55 21
a 20 a 4d 20 4d a 20
4d 20 4d 20 a 20 4d 20
4d 20 a 20 4d 20 4d 20
a 4d 20 4d a 20 a 20
4d 20 4d 20 4d 20 4d 20
a 4d 20 4d 20 4d 20 4d
a 20 4d 20 a 20 4d 20
4d 20 a 20 4d 20 4d 20
a 20 4d 20 a 20 77 61
6b 75 20 77 61 6b 75 7e
20 a
</a>
</comp>
<comp lib="4" loc="(620,90)" name="ROM">
<a name="addrWidth" val="16"/>
<a name="dataWidth" val="16"/>
<a name="contents">addr/data: 16 16
10 2 1 2 2 a 2 2
1 2 2 9 1 4 1 2
2 a 2 2 1 2 2 c
2 1 12 4*1 c 4*1 5 8
5 1 5 1 6 1 5 1
6 1 4 1 6 1 7 1
2 1 7 1 8 2 8 20*1
12 1 2 e 2 1 2 2
a 2 2 1 4 1 8 1
4 1 2 2 a 2 2 1
2 e 2 1 12 4*1 c 4*1
5 8 5 1 5 1 6 1
5 1 6 1 4 1 6 1
7 1 2 1 7 1 8 2
8 1 6 7*1 5 1 12 1
2 3 a 1 2 1 1 1
3 1 9 1 2 1 5 1
9 1 2 1 4 1 a 1
2 1 3 1 b 1 2 1
12 1 3 1 b 1 2 1
12 1 6 2 3 2 5 1
5 1 2 3 2 1 4 1
5 1 7 1 4 1 5 1
2 3 2 1 4 1 6 2
3 2 5 1 7 1 1 2
1 1 5 1 12 1 1 3
1 9 1 3 1 1 1 3
1 9 1 3 1 1 1 3
1 9 1 3 1 1 1 3
1 9 1 3 1 1 1 3
1 9 1 3 1 1 1 3
b 3 1 1 13 1 2 1
1 1 a 9*1 c 4*1 13 1
6 1 6 1 5 1 7 1
1 2 1 1 6 1 8 1
2 1 7 22*1 14 1 2 e
2 1 2 2 a 2 2 1
4 1 8 1 4 1 2 2
a 2 2 1 2 e 2 1
12 5*1 a 8*1 c 4*1 8 2
8 1 7 1 2 1 7 1
7 1 2 1 7 1 8 2
8 1 4 10*1 4 1
</a>
</comp>
<comp lib="1" loc="(150,250)" name="Buffer">
<a name="facing" val="south"/>
<a name="width" val="16"/>
</comp>
<comp lib="6" loc="(730,61)" name="Text">
<a name="text" val="Offset -1"/>
</comp>
<comp lib="1" loc="(350,30)" name="Buffer">
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(320,160)" name="Constant">
<a name="facing" val="west"/>
</comp>
<comp lib="1" loc="(580,310)" name="Buffer">
<a name="width" val="16"/>
</comp>
<comp lib="3" loc="(450,200)" name="Comparator">
<a name="width" val="16"/>
</comp>
<comp lib="6" loc="(262,205)" name="Text">
<a name="text" val="reg CTN"/>
</comp>
<comp lib="1" loc="(810,90)" name="Buffer">
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(60,40)" name="Clock"/>
<comp lib="1" loc="(220,250)" name="Buffer">
<a name="facing" val="south"/>
<a name="width" val="16"/>
</comp>
<comp lib="1" loc="(410,140)" name="Buffer">
<a name="facing" val="west"/>
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(380,170)" name="Constant">
<a name="width" val="16"/>
<a name="value" val="0x0"/>
</comp>
<comp lib="0" loc="(510,200)" name="Bit Extender">
<a name="in_width" val="1"/>
</comp>
<comp lib="6" loc="(115,125)" name="Text">
<a name="text" val="reg PTR"/>
</comp>
<comp lib="6" loc="(51,25)" name="Text">
<a name="text" val="Clock"/>
</comp>
<comp lib="0" loc="(430,460)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="16"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="5" loc="(830,400)" name="TTY">
<a name="rows" val="14"/>
<a name="cols" val="20"/>
<a name="color" val="#7fed00"/>
<a name="bg" val="#000000cc"/>
</comp>
<comp lib="1" loc="(400,90)" name="Buffer">
<a name="width" val="16"/>
</comp>
<comp lib="4" loc="(120,80)" name="Register">
<a name="width" val="16"/>
</comp>
<comp lib="0" loc="(730,450)" name="Pin">
<a name="facing" val="west"/>
<a name="output" val="true"/>
<a name="width" val="7"/>
<a name="labelloc" val="east"/>
</comp>
<comp lib="3" loc="(440,250)" name="Comparator">
<a name="width" val="16"/>
</comp>
<comp lib="6" loc="(522,46)" name="Text">
<a name="text" val="Rom 1(ptr count)"/>
</comp>
</circuit>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment