Changes

Jump to: navigation, search

FPGAmstrad

764 bytes added, 18:22, 11 October 2017
/* State machine */
Both component of Bootloader, it is to say SPI_MASTER and SDRAM_FAT32_LOADER components, does use several state-machines, one state-machine per process, each process communicating with another one using "MASTER/SLAVE" : the master state-machine does ask a slave to do something, and slave does notify master when its task is finished.
In VHDL, I implements state-machine using a simple "switch case" on an '''integer'''. and before break I just change this integer variable value, changing line of "switch case" this way.This "switch case" is encalupsed on a "if do/done do/done do/done" instruction. do being a boolean from MASTER, and done being a boolean from SLAVE. Each MASTER against SLAVE component has a "do" (input if SLAVE component, output if MASTER component) and a "done" (input if MASTER component, output if SLAVE component) wire.That's all. Like this you can run several sequential instructions, like reading and interpreting severals FAT32 variables using a SPI slaved component solving "read one byte at this address" turned into low-level SDCARD protocol language. Theses state-machines does use led debug : an '''integer ''' contains the state of state machine, and this '''integer ''' is displayed on 8 leds so you know where you are, it's for that I add several crash states in order to understand why and where component does crash. In MiST-board, this is displayed on the five 7-segment I added in OSD, I add also an input in order to select one or another state machine.
==== FPGAmstrad_amstrad_video schematic ====
1,200
edits