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

Discussion Groups | FPGA-CPU | interconnection between FPGA and PC

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).

interconnection between FPGA and PC - RANJITH KUMAR REDDY - Mar 10 1:00:18 2008

Hello

Can any one help me regarding how to connect the FPGA to a micro
processor simulator.

I am actually trying to do a project on Using FPGA to implement
Floating point multiplier were the FPGA does the required
multiplication for microprocessor to speed up, for which i am
writing a Verilog code and dump it into FPGA now i want to simulate
it and see the performance. I just cant buy a micro processor to
interact with FPGA so i was thinking to simulate it Using some sofware
simulator like 8085 simulator.

To post a message, send it to: f...@yahoogroups.com
To unsubscribe, send a blank message to: f...@yahoogroups.com



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


Re: interconnection between FPGA and PC - artiedc - Mar 10 1:24:10 2008

--- In f...@yahoogroups.com, "RANJITH KUMAR REDDY"
wrote:
>
> Hello
>
> Can any one help me regarding how to connect the FPGA to a
micro
> processor simulator.
>
> I am actually trying to do a project on Using FPGA to
implement
> Floating point multiplier were the FPGA does the required
> multiplication for microprocessor to speed up, for which i am
> writing a Verilog code and dump it into FPGA now i want to
simulate
> it and see the performance. I just cant buy a micro processor to
> interact with FPGA so i was thinking to simulate it Using some
sofware
> simulator like 8085 simulator.
>

Why not just connect the FPGA to your PC's Paralell port and use VB
or buy a PIC BasicStamp II and have it provide an interface \ debug
port.

You could even put a serial XMIT module in the FPGA for dumb
debugging or an UART for a com interface port with debug command
option written.

To post a message, send it to: f...@yahoogroups.com
To unsubscribe, send a blank message to: f...@yahoogroups.com



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

Re: interconnection between FPGA and PC - rtstofer - Mar 10 12:14:39 2008

--- In f...@yahoogroups.com, "artiedc" wrote:
>
> --- In f...@yahoogroups.com, "RANJITH KUMAR REDDY"
> wrote:
> >
> > Hello
> >
> > Can any one help me regarding how to connect the FPGA to a
> micro
> > processor simulator.
> >
> > I am actually trying to do a project on Using FPGA to
> implement
> > Floating point multiplier were the FPGA does the required
> > multiplication for microprocessor to speed up, for which i am
> > writing a Verilog code and dump it into FPGA now i want to
> simulate
> > it and see the performance. I just cant buy a micro processor to
> > interact with FPGA so i was thinking to simulate it Using some
> sofware
> > simulator like 8085 simulator.
> >
> Why not just connect the FPGA to your PC's Paralell port and use VB
> or buy a PIC BasicStamp II and have it provide an interface \ debug
> port.
>
> You could even put a serial XMIT module in the FPGA for dumb
> debugging or an UART for a com interface port with debug command
> option written.
>

I was developing an ALU and needed to do the same kind of thing. I
wanted to send operators and operands and get back the results.

For whatever reason, I decided to do it the hard way: I used a
Blackfin BF537 STAMP micro to interact with the FPGA ALU via SPI
(because it is FAST) and the Blackfin grabbed the test vectors from
my Linux box via NFS. The Blackfin also sent the test results out
the USART to a minicom session.

Clearly this is NOT the most straightforward way to do things. But I
really wanted a chance to play with the Blackfin board.

Were I doing it today, I would probably use a USB Bit Wacker between
the PC and the ALU. You can easily implement SPI on the Bit Wacker
and make it look like a USB VCOM port on the PC. In fact, although I
blew it off, the Bit Wacker comes with some very handy pre-installed
IO code. See
http://www.sparkfun.com/commerce/advanced_search_result.php?
keywords=ubw and http://greta.dhs.org/UBW/index.html

But, if cost is an issue, there is a pretty nice UART core at
www.opencores.com so you can just implement a serial port.

If you can get your PC to use the EPP protocol on the parallel port
(a REAL parallel port), you can add 256 bidirectional data port (8
bit) and an address port. This is nice because you wind up being
able to stuff bytes in operand registers and read result registers.
Write the address register and decode it within the FPGA. Then when
the data register write comes along, stuff the data into the FPGA
register.

See http://www.beyondlogic.org/epp/epp.htm The difficulty will be
with Windows and its protection of the parallel port. You will need
to install a driver like Port95NT.exe or InpOut32.dll
http://www.lvr.com/parport.htm Mix up a little Visual Basic (or C,
C++) and you are ready to go.

Given the availability of a REAL parallel port, I prefer that method
although logic level translation may be required. It depends on
whether the FPGA has 5V tolerant pins. If not, use some 74LVCC3245A
level shifting bus transceivers
http://www.ti.com/lit/gpn/sn74lvcc3245a

OK, there's a few ideas. Have fun!

Richard

To post a message, send it to: f...@yahoogroups.com
To unsubscribe, send a blank message to: f...@yahoogroups.com



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

Re: interconnection between FPGA and PC - Tomasz Sztejka - Mar 10 18:22:32 2008


--- RANJITH KUMAR REDDY wrote:

> Hello
>
> Can any one help me regarding how to connect the FPGA to a micro
> processor simulator.
>
> I am actually trying to do a project on Using FPGA to implement
> Floating point multiplier were the FPGA does the required
> multiplication for microprocessor to speed up, for which i am
> writing a Verilog code and dump it into FPGA now i want to simulate
> it and see the performance. I just cant buy a micro processor to
> interact with FPGA so i was thinking to simulate it Using some sofware
> simulator like 8085 simulator.
>

According to hardware UART is almost always the easiest way. Should be easier
than par-port, since it is directly supported by most OS'es, while parport is
almost always seen as "printer only" and needs additional software.

You won't be able to simulate FPGA<->CPU bus connections.

And, what is even more important - do You have an 8085 simulator which can
connect simulated CPU to a real I/O port?

Tomasz Sztejka
__________________________________________________________
Sent from Yahoo! Mail.
The World's Favourite Email http://uk.docs.yahoo.com/nowyoucan.html
To post a message, send it to: f...@yahoogroups.com
To unsubscribe, send a blank message to: f...@yahoogroups.com



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

Re: interconnection between FPGA and PC - rtstofer - Mar 10 19:49:45 2008

--- In f...@yahoogroups.com, Tomasz Sztejka wrote:
> --- RANJITH KUMAR REDDY wrote:
>
> > Hello
> >
> > Can any one help me regarding how to connect the FPGA to a
micro
> > processor simulator.
> >
> > I am actually trying to do a project on Using FPGA to
implement
> > Floating point multiplier were the FPGA does the required
> > multiplication for microprocessor to speed up, for which i am
> > writing a Verilog code and dump it into FPGA now i want to
simulate
> > it and see the performance. I just cant buy a micro processor to
> > interact with FPGA so i was thinking to simulate it Using some
sofware
> > simulator like 8085 simulator.
> > According to hardware UART is almost always the easiest way. Should
be easier
> than par-port, since it is directly supported by most OS'es, while
parport is
> almost always seen as "printer only" and needs additional software.
>
> You won't be able to simulate FPGA<->CPU bus connections.
>
> And, what is even more important - do You have an 8085 simulator
which can
> connect simulated CPU to a real I/O port?
>
> Tomasz Sztejka

Parallel CAN be a lot easier than serial IF the PC has a REAL
parallel port (USB probably doesn't count). Simply by the definition
of EPP, the destination register for the data is known. Here is the
FPGA interface:

-- EPP Parallel Port

EPPDataBus : inout std_logic_vector(7 downto 0);
nAddrStrobe : in std_logic;
nDataStrobe : in std_logic;
nWrite : in std_logic;
nWait : out std_logic;
nEPPReset : in std_logic;

When we see the nAddrStrobe, we put the byte in the address register
and use that to determine which register receives the data byte when
nDataStrobe comes along.

Since the address is 8 bits, we can have 256 bidirectional 8 bit
registers.

Portions of the VB code look like:

Imports System
Imports System.IO

Module IO

Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
As Integer

Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(ByVal PortAddress As Integer, _
ByVal Value As Integer)

Imports System
Imports System.IO

Module IO

Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
As Integer

Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(ByVal PortAddress As Integer, _
ByVal Value As Integer)

Code to initialize EPP mode:

Public Sub PortSetup(ByVal PortBaseAddress As Integer)

SPPDataPort = PortBaseAddress
StatusPort = PortBaseAddress + 1
ControlPort = PortBaseAddress + 2
EPPAddressPort = PortBaseAddress + 3
EPPDataPort = PortBaseAddress + 4
ECPConfigPort = PortBaseAddress + &H402
ECPEIR = PortBaseAddress + &H403
ECPControl2 = PortBaseAddress + &H404

Out(ECPConfigPort, &H94)
Out(ECPEIR, &H2)
Out(ECPControl2, &H10)
Out(ControlPort, &HC4)

End Sub

Code to write the EPP port (reading is similar)

Private Sub SetTrigger(ByVal TriggerSource As Byte, ByVal
TriggerPolarity As Byte, _
ByVal TriggerDelay As Byte)

Out(EPPAddressPort, TriggerSourceReg)
Out(EPPDataPort, TriggerSource)

Out(EPPAddressPort, TriggerPolarityReg)
Out(EPPDataPort, TriggerPolarity)

Out(EPPAddressPort, TriggerDelayReg)
Out(EPPDataPort, TriggerDelay)

End Sub

That's about all it takes. Just implement the registers in the FPGA
and write a little VB code.

Richard

To post a message, send it to: f...@yahoogroups.com
To unsubscribe, send a blank message to: f...@yahoogroups.com



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

Re: interconnection between FPGA and PC - Tommy Thorn - Mar 22 9:27:56 2008

--- RANJITH KUMAR REDDY
wrote:
> I am actually trying to do a project on Using
> FPGA to implement
> Floating point multiplier were the FPGA does the
> required
> multiplication for microprocessor to speed up, for
> which i am
> writing a Verilog code and dump it into FPGA now i
> want to simulate
> it and see the performance. I just cant buy a micro
> processor to
> interact with FPGA so i was thinking to simulate it
> Using some sofware simulator like 8085 simulator.

Assuming that you're trying to design an embedded
system, what you're trying to do might not be a good
idea.

Communication latency will dominate the time to
compute
in the coprocessor. Besides, FPGA are much faster than
nearly all microcontrollers. You'd be much better of
just integrating the floating point core with a
softcore of your choice. There are oogles of options
available, but I'd obviously recommend my own MIPS
implementation YARI (http://repo.or.cz/w/yari.git)

As for interfacing with the outside world (eg a PC)
it really all depends on what hardware you have
available.
PCI-E is the fastest,
Ethernet is the most flexible and versatile,
RS232 serial is the slowest and simplest (fewer pins),
USB is ubiquitous, etc.

Use what you got.

Tommy

____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

------------------------------------

To post a message, send it to: f...@yahoogroups.com
To unsubscribe, send a blank message to: f...@yahoogroups.com



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