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.

Verilog Comman Line Interface

Status
Not open for further replies.

ersn

Newbie level 4
Newbie level 4
Joined
May 19, 2013
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,327
Verilog Command Line Interface

In this project, you will learn how to use Xilinx FPGA card, 32 input switches and four 7‐
segment displays as a command line interface unit, and incorporate a command line
structure so that several commands can be given to the interface and then the results
can be seen from the seven segments displays.
You will use 32 input switches as a keyboard and the 7‐segment displays as a line‐screen
where the inputs should be seen, very much like a DOS or UNIX interface. Your keyboard
design should have the following letters, numbers and symbols:
A B C D E F H I J L P S U
0 1 2 3 4 5 6 7 8 9 0
‐ *
ENTER (when pressed, the function should be executed)
Hint: You may want to reserve one of the switches so that you can use it to switch between
numerical and alphabetical/symbolic keys.
The seven segment display should be able to display the line that is currently being written/to
be executed. There should only be up to 4 characters on the seven segment displays at any
time, in no part of this project you are required to deal with anything more than 4 characters.
Your design should be able implement all of the functions outlined.

Add: Add two numbers. 2 parameters are used, as the numbers to be added.
ADD 4 2 = 6
Subtract: Subtract the second number from the first. 2 parameters are used as numbers.
SU 4 2 = 2
Concatenate: Add two letters & words together. Two parameters are enough.
CAE AB DC = ABDC

I have such a project assignment but I do not know where to start how the inputs are defined. Could you recommend me something?
 

I recommend reading whatever course material you got assigned. Okay, you don't know how the inputs are defined. So what do you know that is applicable to your project assignment?
 

When A D D is typed after enter is pressed the four 7 segment display must show ADD what I thought does A then D and then D but not ADD. What I am asking is this.
 

No doubt. Instead of describing the question in more detail ... describe in more details what you did so far for this homework assignment.
 

To store information i need to use a memory element, register. But I do not know how to define should i define the inputs as registers. This is one of problems I face.
 

function [4:0] add;
input [3:0] a;
input [3:0] b;
begin
add = a+b;
4'h0: add = 7'b0111111;
4'h1: add = 7'b0000110;
4'h2: add = 7'b1011011;
4'h3: add = 7'b1001111;
4'h4: add = 7'b1101101;
4'h5: add = 7'b1101101;
4'h6: add = 7'b1111101;
4'h7: add = 7'b0000111;
4'h8: add = 7'b1111111;
4'h9: add = 7'b1100111;
end
endfunction

for add function I could write this code segment

4'hx : add = 7'bxxxxxxx using this can I make 7 segment Led light work
 

No clue what you think that'll do. All I can think of is that you saw some concepts somewhere, and threw them together in the hopes that it does something. The 2nd half looks like a vague attempt at a case statement maybe? Anyways, see this bit on case statements: https://www.asic-world.com/verilog/vbehave2.html
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top