I'm doing a pretty complex state machine, which is perfect for in memory (blockRAM based) encoding.
Before I go through and build my own state machine compiler out of python hack-scripts or Excel macros, does someone already have such a compiler available?
--
Nicholas C. Weaver. to reply email to "nweaver" at the domain
icsi.berkeley.edu
There really should be a couple of good examples out there someplace, if nothing else, for times like this.
I know of two general ways to do it:
One is to think like a state machine. Write a program that iterates through each address, unpacks the address into current-state and input signals, sets up default output conditions... Then the body of the loop acts like the state machine - big case statement, inspecting the input flags, setting up next-state and output bits... Then the tail of the program packs up the output and writes out the ROM data.
The other way is to think like microcode. For that, you want an assembler. This is basically encoding the current-state in the PC. The assembler can be really really simple, but it sure helps to have one to copy from. Branching is usually done by ORing/MUXing bits into the PC.
I'm likely to get a hack-attack sometime. What's a good sample state machine that will run on the Spartan 3 starter kit? (Maybe blink LEDs or something)
--
The suespammers.org mail server is located in California. So are all my
other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's. I hate spam.
if you are using xilinx devices, picoblaze could be a smart solution for (medium) complex state machines... VHDL source and some (mostly DOS/Win32 based) assemblers are avaiable (for free).
picoblaze could possible run at 125MHz too, but it takes a little more resources than BRAM based statemachine.
formatting link
:)
I really wonder there is no BlockRAM statemachine tool yet available, the "core" itself itself is plain simple so only some script is needed to prepare the rom contents. I hope I could find time todo it !
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.