Author Topic: Anyone use Logisim?  (Read 53228 times)

0 Members and 1 Guest are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Anyone use Logisim?
« Reply #45 on: December 02, 2010, 12:00:44 am »
 ;D ;DI just happen to be doing exactly this, with a twist: It's my own CPU, with its own handbuilt gates. It also runs in base 4.

I designed and built all the gates, and an adder, last year. I built an AND, OR, and NOT gate. ANDs comprise an OR and three NOTs, two on in, one on out. It works.


It really works, even in binary :P it also follows all proofs applied to Binary logic. XORs can't exist, really, unless someone can come up with a way.

base 4 computing is the way of the future. This design will be expandable to any base you want, but higher bases mean higher voltages, and base 4 is already reaching fairly unsafe (~36 V in the adder) levels anyways.

I made the first gates for a State Science fair project, got second place. This year I'm making a programmable CPU.  ;D

You may be wondering-why base 4?
Spoiler For Spoiler:
because base 4 gives you ^2 power for your components. A 4-bit quaternary CPU has as many options as a binary 16-bit processor, but has a similar component count to a 4-bit binary CPU. This is because base 4's 4 bit would be like 0231 for commands, while binary 4-bit would be 0110.

By the way, my logic in base 4 works like this:
AND=take lower number
Or=Take higher number
Not=invert number across middle

I just wish it was easier. This design stuff is hard! My first design used lots of opamps, but my OR gate now only needs 2 components.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Anyone use Logisim?
« Reply #46 on: December 02, 2010, 12:05:26 am »
Xor:

00000:0
00001:1
00010:1
00100:0
00101:0

And you get the idea. Of course that actually describes a 4 input binary XOR, but it *should* be applicable to Quaternary.

I prefer Ternary myself, though.

EDIT: There are 65,536 logical operators in Quaternary. Picking a XOR out of that would be difficult.
« Last Edit: December 02, 2010, 12:07:53 am by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Anyone use Logisim?
« Reply #47 on: December 02, 2010, 12:06:35 am »
Well, this is definitely giving us experience in designing the thing. We can make our own processors!
Oh actually OTCalc used a pre-made one.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Anyone use Logisim?
« Reply #48 on: December 02, 2010, 12:07:37 am »
Ternary (trinary, right? both are correct) has disadvantages, namely that it isn't easily compatible with binary or hex. quaternary is easily converted to either. Other than that, I can't really think of any reason to choose either except that higher base=more data for components.

SirCmpwn

  • Guest
Re: Anyone use Logisim?
« Reply #49 on: December 02, 2010, 12:19:06 am »
This is really awesome!  I've been playing around with it a little for about an hour, and I've been making my own processor.  I have a nice set up for registers, I think, but I'm not sure how I should start interpreting opcodes.  Thoughts?

EDIT: I think I have figured out a way, and uploaded the new circuit with a demonstration.
« Last Edit: December 02, 2010, 01:02:29 am by SirCmpwn »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Anyone use Logisim?
« Reply #50 on: December 02, 2010, 01:12:14 am »
Okay, I haven't checked yours yet, but here's mine :D It doesn't do much and my notes are rather sparse, sorry. All the stuff has to be input manually at the moment, but I am working on that :D

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Anyone use Logisim?
« Reply #51 on: December 03, 2010, 05:48:58 am »
Now that I turned in my project and had it graded, I think I can upload it online.  Here is the CPU I made.  I spent a lot of time organizing it into subcircuits which is a really helpful technique.  It's a 16-bit RISC processor with 4 registers and there's about 20 different instructions.

I also have a conway's game of life program that can be loaded into the rom.  Its really slow since it has to go pixel by pixel so it takes about a minute for each generation at the fastest clock speed.  The first 12 words of ram are the screen buffer.  A good starting configuration to test is the first 4 bytes: 0x0000, 0x0040, 0x0050, 0x0060 which makes a glider.  Feel free to use elements of this in your designs if you're having trouble with any part.
___Axe_Parser___
Today the calculator, tomorrow the world!

SirCmpwn

  • Guest
Re: Anyone use Logisim?
« Reply #52 on: December 03, 2010, 08:45:11 am »
Very nice!  Looks quite detailed.  I'm only getting a basic grasp of how to make a CPU, so mine is still very basic.  But I did figure out a way of having polybyte opcodes.  My setup has a PC which reads in ROM on every clock cycle, and increments PC.  You can't change and read the address from ROM on a single clock, so this is the method I devised:
0. If the flip flop is set, skip to 3
1. Read in and interpret the opcode.
2. If it is multibyte, toggle a flip flop value with the instruction name
3. Execute the instruction, reset the flip flop

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Anyone use Logisim?
« Reply #53 on: December 03, 2010, 11:37:40 am »
Oh, Cool! I didn't know I could do that with the different parts of the circuit! Here I've been working with an increasingly cluttered mess! Well, I have no experience wit this kind of a thing, so I am still trying to figure things out with using the clock for the interpreter. I have it so that the interpreter recognises loads between registers, I just need to use a clock to time things just right... Well, I could just redesign some of the circuit and that would make it run faster, but it would use more components :(

Offline Madskillz

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 488
  • Rating: +32/-2
    • View Profile
Re: Anyone use Logisim?
« Reply #54 on: December 03, 2010, 02:57:28 pm »
Ah logisim...I had to make a garage door opener with it for a final project in one of my classes.

Offline LordConiupiter

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 339
  • Rating: +3/-0
  • Just one of the thousands of Axe-fans...
    • View Profile
Re: Anyone use Logisim?
« Reply #55 on: December 03, 2010, 04:19:42 pm »
this is really very cool! I have worked with a program that looks like it, but didn't do anything usefull, and was full of bugs. really stupid bugs. I like hardware, but prefer software. I will use this program one day, that's for sure!
everytime that I was down, you would always come around, and get my feedback on the ground. (modified part from 'Seasons in the sun')

No matter how many errors are bothering you, always try to stay rel-Axe!

The HoMM project will be resumed as soon Axe 1.0.0 will be released!
Projects:
Code: [Select]
HoMM:   [==--------]    Project 'resumed': I'm suffering overwhelming new ideas being popped up in my dreams :P
tiDE:   [----------]    Explored and understood the main part of the code: just started writing a Tokenizer.



password of the week: uvanapererubupa (Any pronunciation is the right one ;) )   :D click me, and you'll be raided :D

SirCmpwn

  • Guest
Re: Anyone use Logisim?
« Reply #56 on: December 03, 2010, 04:59:10 pm »
Here I've been working with an increasingly cluttered mess!
Mine looks like a cluttered mess, but I really don't care, because once I start actually interpreting instructions, I'm going to delete most of what I already have.  It's mostly just a means of testing the individual components and concepts behind the processor.  What I have right now is a simple interpreter (used to test out various methods of interpreting instructions), a LCD toggle pin (used to test actually performing an instruction), an instruction flip-flop for testing out the ideas I mentioned earlier, which is used to modify registers in my register subcircuit.  Up until today, the register subcircuit worked with only 4 8-bit registers, but I have an experimental version that allows you to combine two of the 8-bit registers into a 16-bit register.  (So you can use A, B, C, D, AB and CD)
Once I finish the register subcircuit, I'll upload it here, because it could be quite useful to some people.
« Last Edit: December 03, 2010, 04:59:49 pm by SirCmpwn »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Anyone use Logisim?
« Reply #57 on: December 03, 2010, 08:11:13 pm »
Alright so i have been exremely busy working on my CPU, and it is almost finished.  It currently has about 40 different oppcodes, with many different arguments.  The features it currently supports are these:

Hardware:
4 Registers
256 bytes of program ROM
256 bytes of memory RAM
8 byte address stack
Memory mapped LCD
text output
text input
numerical input
Zero and carry flags for conditions

Commands:
Loading Registers into registers
Loading constants into registers
Loading constants into RAM
Loading Ram into registers
Loading ROM into registers
Loading random numbers into register
Loading random numbers into RAM
Jumping to other parts in the program
Jumping conditionally to other parts in the program
Calling other parts of the program
Calling conditionally other parts in the program
Returning from calls
Doing arithmetic on a register and A (Adding/Subtract/Multiply/Divide/Mod/XOR/AND/OR)
Doing arithmetic on a constant and a register
Doing arithmetic on a register (increment/decrement/Clear/Negae/Shift Right/Left with carry/Shift right/left circularly)
Decrement B and Jump to address if not zero (for loops)
refresh the LCD
Output a character stored in a register
Clear the text screen
Terminate the program
Terminate on a condition
« Last Edit: December 03, 2010, 08:11:36 pm by Builderboy »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Anyone use Logisim?
« Reply #58 on: December 03, 2010, 11:11:08 pm »
Awesome! :D

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Anyone use Logisim?
« Reply #59 on: December 03, 2010, 11:20:22 pm »
i have come up with the definition of logisim.

Logisim: when a computer emulates a computer which runs a program that allows a user to create a computer and then emulate it.

breakdown:
first, you start with your hardware computer, which is emulating the JVM (java virtual machine, what java runs on), which is running the java program, which you can then create hardware which you can emulate.