Sign in

username:

password:



Not a member?

Search fpga-cpu



Search tips

Subscribe to fpga-cpu



fpga-cpu by Keywords

Altera | CISCifying | IDE | ISA | Java | JHDL | JTAG | LBU | MicroBlaze | PAR | PCI | RISC | SoC | Spartan | Transputers | Verilog | VHDL | Virtex | VLIW | WebPack | Xilinx | Xsoc | YARD-1A


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | FPGA-CPU | Help in compiler design.


Advertise Here

This list is for discussion of the design and implementation of field-programmable gate array based processors and integrated systems. It is also for discussion and community support of the XSOC Project (see http://www.fpgacpu.org/xsoc).

Help in compiler design. - Frangline - Mar 20 11:50:00 2002

Hi,
I designed a minimal cpu for FPGA and Iam testing it now.
I found it really difficult for writing programmes in machine language.

I would be thankful if some one here cold give some idea
on writing an assembler or compiler.

Thanks,
Frang.





(You need to be a member of fpga-cpu -- send a blank email to fpga-cpu-subscribe@yahoogroups.com )


Re: Help in compiler design. - Martin Schoeberl - Mar 20 11:54:00 2002

> I would be thankful if some one here cold give some idea
> on writing an assembler or compiler.
>
A simple assembler written in a good language (like Java with built in
StreamTokenizer)
could be done in a few hours (and only with few lines).
If you're interested I can send you an example

Martin




(You need to be a member of fpga-cpu -- send a blank email to fpga-cpu-subscribe@yahoogroups.com )

Re: Help in compiler design. - Tim Boescke - Mar 20 13:13:00 2002


> I designed a minimal cpu for FPGA and Iam testing it now.
> I found it really difficult for writing programmes in machine language.
>
> I would be thankful if some one here cold give some idea
> on writing an assembler or compiler.

Just try SMAL. Its a configurable Assembler.

http://www.cs.uiowa.edu/~jones/cross/smal32/
http://www.cs.uiowa.edu/~jones/cross/




(You need to be a member of fpga-cpu -- send a blank email to fpga-cpu-subscribe@yahoogroups.com )

Re: Help in compiler design. - Jacob Nelson - Mar 20 15:08:00 2002

On Wed, 20 Mar 2002, Frangline wrote:

> I would be thankful if some one here cold give some idea
> on writing an assembler or compiler.

When I did something similar, I hacked together a very simple assembler in
Perl. It just converted the nmenonics to machine language bits I could
load into memory. No fancy stuff (variables? negative numbers? hah! :-),
but it did made coding easier.

If you want to have a compiler, a better assembler would be advisable, I
think. If you just want to write small programs, spending a little time
with your favorite string processing language is probably easiest.

jake





(You need to be a member of fpga-cpu -- send a blank email to fpga-cpu-subscribe@yahoogroups.com )

Re: Help in compiler design. - Veronica Merryfield - Mar 20 17:08:00 2002

For a retargetable ANSII C compiler, check out LCC at
http://www.cs.princeton.edu/software/lcc.

Also, check out XSOC and what Jan has done with LCC at
http://www.fpgacpu.org if you haven't already done so.

GCC is also an option but will be harder to port.

Hope this helps.

Veronica

-----Original Message-----
From: Frangline <>
To: <>
Date: 20 March 2002 16:50
Subject: [fpga-cpu] Help in compiler design. >Hi,
>I designed a minimal cpu for FPGA and Iam testing it now.
>I found it really difficult for writing programmes in machine language.
>
>I would be thankful if some one here cold give some idea
>on writing an assembler or compiler.
>
>Thanks,
>Frang. >To post a message, send it to:
>To unsubscribe, send a blank message to:




(You need to be a member of fpga-cpu -- send a blank email to fpga-cpu-subscribe@yahoogroups.com )

assembler (was Re: Help in compiler design.) - Eric Smith - Mar 20 17:53:00 2002

> When I did something similar, I hacked together a very simple assembler
> in Perl. It just converted the nmenonics to machine language bits I
> could load into memory. No fancy stuff (variables? negative numbers?
> hah! :-), but it did made coding easier.

I wrote an assembler in Perl for the HP-21xx minicomputers. It's
complete in the sense that I think it supports all of the assembly
language features that HP's own assembler did (including floating point
constants), but it's not too fancy. It is GPLd and may be downloaded
from:

http://www.brouhaha.com/~eric/retrocomputing/hp/21xx/asm21.zip

The 21xx has some "microcoded" instructions like the early DEC machines
(most popularly, the PDP-8). This means that individual bits or groups
of bits in some instruction formats have independent meanings, like
horizontal microcode in a "conventional" microcoded machine. So my
assembler had to go to a bit of trouble to allow combining these
"microinstructions" and verifying that incompatible ones aren't merged.
All of that code can be deleted if one wants to assemble for a more
conventional architecture.

Eric



______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of fpga-cpu -- send a blank email to fpga-cpu-subscribe@yahoogroups.com )