FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-18-2009, 03:33 PM
glallenjr
Guest
 
Posts: n/a
Default ML 403 hardware implementation

ML 403 evaluation board (Virtex 4)
Xilinx ISE 11.1

Essentially we are trying to a load a simple program onto our FPGA but w
have been having a lot of trouble. We have a simple program with two input
a and b and and output y. We are simply trying to execute y <= a OR b. W
are trying to assign a and b inputs to button switches on the board and th
output y to an LED. We have looked online for the proper pinouts but ar
getting an error after changing the ucf file to match the pinouts poste
online. Can someone please offer a step by step process to load this simpl
program onto the virtex 4?
--------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.all;

ENTITY orgate IS
PORT ( a : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
b : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
y : OUT_STD_LOGIC_VECTOR (1 DOWNTO 0));
END orgate;

ARCHITECTURE orgate1 OF orgate IS
BEGIN
y <= (a OR b);
END orgate1;
---------------------------------------------------
thanks!


Reply With Quote
  #2 (permalink)  
Old 11-18-2009, 04:55 PM
whygee
Guest
 
Posts: n/a
Default Re: ML 403 hardware implementation

glallenjr wrote:
> Can someone please offer a step by step process to load this simple
> program onto the virtex 4?
> --------------------------------------------------
> LIBRARY ieee;
> USE ieee.std_logic_1164.all;
>
> ENTITY orgate IS
> PORT ( a : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
> b : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
> y : OUT_STD_LOGIC_VECTOR (1 DOWNTO 0));
> END orgate;
>
> ARCHITECTURE orgate1 OF orgate IS
> BEGIN
> y <= (a OR b);
> END orgate1;
> ---------------------------------------------------


it's completely buggy : a, b and y are 2-bit vectors ???
and what about the OUT_ : remove the '_'
it's more a VHDL syntax learning problem that is the cause
of those troubles (for now).

> thanks!

well...

--
http://ygdes.com / http://yasep.org
Reply With Quote
  #3 (permalink)  
Old 11-19-2009, 10:52 AM
Martin Thompson
Guest
 
Posts: n/a
Default Re: ML 403 hardware implementation

"glallenjr" <[email protected]> writes:

> ML 403 evaluation board (Virtex 4)
> Xilinx ISE 11.1
>
> Essentially we are trying to a load a simple program onto our FPGA but we
> have been having a lot of trouble. We have a simple program with two inputs
> a and b and and output y. We are simply trying to execute y <= a OR b. We
> are trying to assign a and b inputs to button switches on the board and the
> output y to an LED. We have looked online for the proper pinouts but are
> getting an error after changing the ucf file to match the pinouts posted
> online. Can someone please offer a step by step process to load this simple
> program onto the virtex 4?
> --------------------------------------------------
> LIBRARY ieee;
> USE ieee.std_logic_1164.all;
>
> ENTITY orgate IS
> PORT ( a : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
> b : IN STD_LOGIC_VECTOR (1 DOWNTO 0);
> y : OUT_STD_LOGIC_VECTOR (1 DOWNTO 0));
> END orgate;
>
> ARCHITECTURE orgate1 OF orgate IS
> BEGIN
> y <= (a OR b);
> END orgate1;


As has been pointed out, that's not valid VHDL. I suggest you learn to
simulate your design first. You can iterate fixes *much* quicker.

I know it's not as exciting as actually flashing lights, but it really
is the way to go!

As I'm waiting for XPS to compile (yawn), here's a simulator testbench
to get you going.... as I use Emacs vhdl-mode, this took me about 35
secs You'll see there's some bits for you to fill in...


library ieee;
use ieee.std_logic_1164.all;
entity tb_orgate is
end entity tb_orgate;
architecture test of tb_orgate is
signal a : STD_LOGIC_VECTOR (1 DOWNTO 0);
signal b : STD_LOGIC_VECTOR (1 DOWNTO 0);
signal y : STD_LOGIC_VECTOR (1 DOWNTO 0);
begin -- architecture test
DUT: entity work.orgate
port map (
a => a,
b => b,
y => y);
WaveGen_Proc: process
begin
a <= "00";
b <= "00";
wait for 0 ns; -- allow gate to propogate result
assert y="Put the answer you expect in here"
report "answer wrong"
severity error;

wait for 10 ns; -- just so the waveforms progress along the time axis!
a <= "01";
b <= "10";
wait for 0 ns; -- allow gate to propogate result
assert y="Put the answer you expect in here"
report "answer wrong"
severity error;
-- Put some more tests in here with different a and b values
-- for extra credit use a pair of nested loops to test all the combinations of inputs,
-- using VHDL to "calculate" the right answer to put in the assert statement

report (time'image(now) & " Finished");
wait;
end process WaveGen_Proc;
end architecture test;

Cheers,
Martin

--
[email protected]
TRW Conekt - Consultancy in Engineering, Knowledge and Technology
http://www.conekt.net/electronics.html
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to start out on hardware implementation gokul_s1 DSP 9 02-06-2008 08:29 AM
JPEG-LS hardware implementation cms FPGA 8 10-07-2007 09:40 PM
JPEG-LS hardware implementation cms DSP 0 10-04-2007 12:34 PM
Hardware implementation of H.264 Rahul DSP 2 12-07-2006 02:51 PM
CRC hardware vs software implementation!! apple Verilog 3 11-04-2005 12:01 AM


All times are GMT +1. The time now is 04:23 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved