Home    Bloggers    Messages    Webinars    Resources   
Tw  |  Fb  |  In  |  Rss
Ken Boyette

Jurassic HDL: A Single-Bit Processor – 'Little Bit'

Ken Boyette
Page 1 / 2 Next >
Page 1 / 4   >   >>
Karl
Karl
8/2/2012 4:23:16 PM
User Rank
Guru
Re: Even some RISCs have VLE
@Paul: I am also interested in computer architecture and am working on a design that runs if/else, for, while, do, assign.  

Since the FPGA cannot run at the clock speed of an ASIC, the memory blocks and big LUTS allow parallel accesses and ALU speed that reduces the number of cycles compared to the typical compile to ISA approach.  Data width and address widths are whatever is appropriate and the memories do the register function.

It simply does more per cycle to make up for clock speed. 

The block diagram can be downloaded from http://mysite.verizon.net/vzeosqt4/karlsdownloads.

 

 

50%
50%
KenwickVS
KenwickVS
8/2/2012 3:48:10 PM
User Rank
Blogger
Re: ICU Assembler version 0.1 on the web.
Thanks, Mike. I have trouble thinking like a software guy. I tried to run it through Synplify - with disasterous results.

50%
50%
hamster
hamster
8/2/2012 2:21:30 PM
User Rank
Blogger
Re: ICU Assembler version 0.1 on the web.
Of course you are free to give it a go! 

Why bother with a parser? You could just change :
printf("%04x\n", (current->opcode<12) + current->operand);

in printObjectCode() to output in whatever format you like!

Something like this should get you what you are after:
printf("%02x\n", (current->opcode<<4) + (current->operand>>8));
printf("%02x\n", current->operand & 0xFF);






100%
0%
Paul A. Clayton
Paul A. Clayton
8/2/2012 11:47:51 AM
User Rank
Beginner
Re: Even some RISCs have VLE
Karl wrote: "Of all the ISAs, only a few are available on an FPGA.  One of the key optimizations is register management so how many can use a wider word to increase the number of registers?  Instead, I think the wider word is used mainly for memory address modes."

If OpenRISC 2K ever gets developed, it will use VLE for code density and shorter instructions will have access to fewer registers.  (The SPARC example--certainly not FPGA-appropriate--was also used to increase the count of addressible registers.)  Immediates (for addressing memory--code or data--and for constants used in computation) are probably the most significant use of larger and variable length instructions, but opcodes can also eat encoding space.

Karl also wrote: "The ICU is the discussion topic and its intended use is control logicimplementation.  It is not a CPU by any stretch.  It does not drive the memory, rather it is driven by the memory.

If we get distracted trying to study every ISA then there will be absolutely no progress."

I agree and did not mean to cause excessive distraction (the comment on non-existence of VLE ISAs just seemed wrong enough--in a general context not specifically VLEs used in FPGAs to increase register count--to warrant correction).  (This is a danger for me because I am a computer architecture enthusiast, so your warning is, alas, likely appropriate.)

'Little Bit' may provide an interesting introduction into some concepts useful for more involved designs, though I do wonder if it is too simple--perhaps particularly in requiring decisions about characteristics outside of the ICU that allow the system to function--, making such in a design more difficult to use in later projects.  Providing simplicity (ease of understanding), utility (ease of producing useful results that reward effort), and extendability (ease of slightly adjusting or adding to the existing base to address new goals) can be difficult.

50%
50%
Karl
Karl
8/2/2012 9:25:34 AM
User Rank
Guru
Re: Even some RISCs have VLE
@Paul:  Of all the ISAs, only a few are available on an FPGA.  One of the key optimizations is register management so how many can use a wider word to increase the number of registers?  Instead, I think the wider word is used mainly for memory address modes.

To take S360 as an example:

RR format   8 bit opcode, 2 x 4 bit register select fields

RX and RS  8 bit opcode, 3 x 4 bit register select fields, 12 bit address

SI              8 bit opcode, 8 bit operand, 1 x 4 bit reg select, 12 bit address

SS             8 bit opcode, 2 x 4 length, 2 x 4 reg sel, 2 x 12 bit address

In reality, some regs were dedicated and not usable for processing and there was the typical movement of data in and out of memory to get the operands into registers for processing.

The instruction lengths depended on the addressing modes

The ICU is the discussion topic and its intended use is control logicimplementation.  It is not a CPU by any stretch.  It does not drive the memory, rather it is driven by the memory.

If we get distracted trying to study every ISA then there will be absolutely no progress.

50%
50%
KenwickVS
KenwickVS
8/2/2012 8:44:38 AM
User Rank
Blogger
Re: ICU Assembler version 0.1 on the web.
@hamster: Great start - and written in C instead of BASIC! Are we free to give it a go? Also, I think it's good that you targeted 16-bit wide output. We can write simple parsers to re-organize the output to meet any memory organization. Little Bit uses an inerleaved 8-bit-wide external ROM: Even address: A7..A0; Odd: i3..i0,A11..A8.

-KenwickVS

50%
50%
hamster
hamster
8/2/2012 12:21:56 AM
User Rank
Blogger
ICU Assembler version 0.1 on the web.
Have a look at

http://hamsterworks.co.nz/mediawiki/index.php/ICUasm

It is of very, very poor design, but it works enough for short programs, without resorting to lex / yacc and other tools.

Assumes that the output is for 16 bit ROM, with the high nibble containing opcode/

100%
0%
Paul A. Clayton
Paul A. Clayton
8/1/2012 9:24:47 PM
User Rank
Beginner
Re: Even some RISCs have VLE
b16-small is licensed under GPL (according to the paper "b16-small—Less is More") which is not the same as public domain--it requires the providing of source code under the same license for any "linked" content that is distributed with the GPLed content. 

(It is not clear what "linked" content is in the context of a processor, especially for an FPGA design.  I would tend to use the interpretation used by the Linux community where components using a standard interface (syscalls for Linux, memory and I/O interfaces for the stack processor) are not considered "linked".  One could ask Bernd Paysan to clarify if the documentation provided with the source code is not sufficiently clear.)

50%
50%
KenwickVS
KenwickVS
8/1/2012 8:23:04 PM
User Rank
Blogger
Re: Even some RISCs have VLE
Thanks for the link. As Spock would say; "fascinating". Maybe we'll do a 16b, as long as it's in the public domain.

-KenwickVS

50%
50%
Paul A. Clayton
Paul A. Clayton
8/1/2012 7:04:37 PM
User Rank
Beginner
Even some RISCs have VLE
Karl wrote: "All the bits to select registers, ALU functions, and transfer data in and out of memory must fit in a fixed length instruction word."

A lot of ISAs use variable length instruction encodings (x86, IBM S/360, Renesas RX), even ARM and MIPS have been extended with VLE versions/modes (Thumb2 and microMIPS, respectively).  (The Power specification also supports VLE and one variation of SPARC has an instruction that adds 15 bits to each of the next two instructions.)

An FPGA allows greater flexibility, but the width of block RAMs (and hard memory interfaces) tends to constrain variability of "parcel" size (the granularity of variability in instruction length).

Somewhat off-topic: I have read that Bernd Paysan's b16 has a very small implementation that might be of interest to people here.  http://bernd-paysan.de/b16.html

50%
50%
Page 1 / 4   >   >>
More Blogs from Ken Boyette
Ken Boyette has worked around machines all his life, but he's having trouble with the idea of interacting with them the way one would interact with another person.
The little 4-bit Gray code counter presented here can easily be scaled up to whatever size you require...
If you use Google a bit, you can find all sorts of information about both ABEL and CUPL. You might even get off your high horse as a result.
In this column, KenwickVS (a.k.a. Ken Boyette) walks us through the VHDL code for his interpretation of the famous Motorola MC14500B single-bit processor.
flash poll
follow us on twitter
follow Xilinx on twitter
like us on facebook
like Xilinx on facebook
All Programmable Planet     About Us     Contact Us     Help     Register     Twitter     Facebook     RSS