Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can i test a code that its input is integer values

Status
Not open for further replies.

enga3b2

Junior Member level 1
Junior Member level 1
Joined
May 9, 2010
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,375
Hello All,

Kindly i wanna know How can i test a code that its entity input is integer values on spartan3e kit

Thanks
 

You cant give inputs as integers directly.You have to convert them into binary values and input them into the FPGA using switches avalilable in the board.

Suppose you have a value 17 (10001 in binary) to be input into the code running on the kit.Then keep the 5th and 1st switch ON and all others OFF.And press a pushbutton to inform the processor that input is ready to be captured.Your code has to be modified for this.It needs an additional signal "pushbutton_pressed" or something like that.

--vipin
https://vhdlguru.blogspot.com/
 

Thanks :D

But I have only 4 switches on the spartan3e kit and i need more than these if i converted them to binary, so if you know any other solution kindly reply me.

Also i have 3 crystals on the kit and i don't know how to configure any of them to use it as a clock! can any one help in this?
 

say you have 8 bits input to your entity.But you have only 4 switches.so 4 values can be input at a time.This can be done with the help of push buttons.

Code:
if (pb0 = '1') then
  input(3 downto 0) <= switches(3 downto 0);
elsif (pb1 = '1') then
  input(7 downto 4) <= switches(3 downto 0);
end if;

Here pb0 is the first push button, and pb1 is the second push button. First set the switch values so that LSB 4 bits are entered.Then press push button 0.
Now change the switch values for MSB 4 bits.This time press push button 1.
This can be extended for any amount of bits.The main idea is that use push buttons and switches together.

--vipin
https://vhdlguru.blogspot.com/
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top