Book/Tutorial/Guide on creating a soft core processor - Page 1
Forum section: electronics / general

author: BytesGuy
author_rank: Regular Contributor
timestamp: December 11, 2014, 09:28:33 pm
content: Hi all,Does anyone have a decent book/tutorial/guide for creating a soft core processor?I am interested in developing a basic one to synthesise on my Spartan 3E so I have a good excuse to put my board to useThanks

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: December 12, 2014, 12:51:53 am
content: The only one I know of is this:http://www.amazon.com/Microprocessor-Design-Using-Verilog-HDL/dp/0963013351/ref=sr_1_1?ie=UTF8&qid=1418345488&sr=8-1&keywords=monte+dalrymple

author: tggzzz
author_rank: Super Contributor
timestamp: December 12, 2014, 01:01:11 am
content: Look on the manufacturer's websites for information about their softcores. Or search for opencores, or openhardware cores etc.Otherwise, pick an early microprocessor (e.g. 8080, 6800, 6805, 1802) and implement the instruction set yourself. (You probably won't have the same external hardware interface, though! )You will find that to be an excellent way of understanding engineering from high-level requirements through specification to implementation.

author: Rasz
author_rank: Super Contributor
timestamp: December 12, 2014, 04:41:49 am
content: start with this?http://www.amazon.com/Computer-Architecture-Fifth-Edition-Quantitative/dp/012383872X

author: ChrisW
author_rank: Contributor
timestamp: December 12, 2014, 05:22:48 am
content: Quote from: tggzzz on December 12, 2014, 01:01:11 amI would avoid opensores like the plague.

author: tggzzz
author_rank: Super Contributor
timestamp: December 12, 2014, 09:07:28 am
content: Quote from: ChrisW on December 12, 2014, 05:22:48 amWhile I would be more than a little careful before Iusedanything (such as an opencore design) that hasn't been tested in production, the OP is interested in learning.But I've also seen an awful of books and products that are very poor quality.With an enquiring mind and appropriate attitude, You can learn from anything.

author: nctnico
author_rank: Super Contributor
timestamp: December 12, 2014, 09:46:42 am
content: Quote from: wilfred on December 12, 2014, 06:26:23 amBecause most of the designs on that website are mediocre at best.If the OP wants to look at something which works then I suggest to look at Xilinx' Picoblaze or Lattice's LM32 softcore. The Picoblaze is a minimalistic design, the LM32 a full blown 32 bit processor.

author: legacy
author_rank: Super Contributor
timestamp: December 12, 2014, 11:47:06 am
content: i have quite completed mytoy-softcoreand its relateddebug processori find there is no real interest from the web, the only one interested are universitiesso that is the best place to ask questions, i think

author: nctnico
author_rank: Super Contributor
timestamp: December 12, 2014, 07:57:49 pm
content: Just post it on your website. If people are interested they'll find it. What makes a good softcore are good tools like a C compiler. What would interest me is an MSP430 compatible processor. Unfortunately the ones I found so far are always geared towards creating a processor which uses the same amount of clock cycles per instruction etc. I don't care about that as long as it is functionally the same. If the VHDL code is clean you could bolt on stuff like a cache and improve pipelining.

author: legacy
author_rank: Super Contributor
timestamp: December 12, 2014, 08:07:51 pm
content: Pipelining complicated the design, also it complicates the debug engine. In my case i used a multi cycle approach, so this is the reason why i call it "toy"

author: nctnico
author_rank: Super Contributor
timestamp: December 13, 2014, 03:34:07 pm
content: I have been looking into creating an MSP430 clone myself. There are two approaches: using a pipelined design at a high clock rate which needs several cycles to complete one instruction or create something slow with a lot of combinatorial logic which executes one instruction per cycle.

author: legacy
author_rank: Super Contributor
timestamp: December 13, 2014, 04:46:01 pm
content: There are four approaches:single cyclemulti cycle pipelinedmulti cycle not pipelined without fixed clock for stagemulti cycle not pipelined with fixed clock for stagemy toy-softcore is using the last one, which means main clock dived by the number of stages, in my case n=5 stages, so 50Mhz / 5 = 10Mhzthe second approach performs the best because it permits instructions to be executed in parallel, so …. real 50Mhzbtw, you need adebug engineintegrated with in the project, else way it is very complex to test and validate yoursoftcore, this is my experience.

author: nctnico
author_rank: Super Contributor
timestamp: December 13, 2014, 05:09:18 pm
content: I'd simulate it first before implementing it in real hardware. I think a book on designing processors also covers creating a test program which tests all the execution paths.

author: photon
author_rank: Frequent Contributor
timestamp: December 13, 2014, 05:12:08 pm
content: A problem with single cycle execution of instructions is accessing off-chip memory. You want to support commodity memory like DRAM and NAND Flash but these devices take multiple clocks to read or write one piece of data. Load and Store are the processor instructions that will be impacted.

author: legacy
author_rank: Super Contributor
timestamp: December 13, 2014, 05:20:27 pm
content: Quote from: nctnico on December 13, 2014, 05:09:18 pmyes, but it makes the test activity too long and boring, trust me, i have realized this idea implementing things in the real world: testing a soft core is not an amazing activity, it takes a lot of time an resources, so what you love is a way to dynamically test things because it can reduces the time you have to spent on simulators (which are slow)i love the code injection approach with vector tests, the validation time is 4 time faster and amazing (instead of boring)so you'd better go for a good debug engine as the one i have designed

author: BytesGuy
author_rank: Regular Contributor
timestamp: December 15, 2014, 12:44:22 am
content: Thanks for all the comments!I did start looking at the pico blaze as my fpga board has a spartan 3e on it.My idea was to just have some fun by trying to implement a z80 and other parts of the computer I have designed around it.Thanks again, time to get to work