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 to implement buffer in vhdl

Status
Not open for further replies.

xilinx1001

Member level 3
Joined
Apr 3, 2013
Messages
60
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,781
Hi,

I need to implement a circular buffer in VHDL

I have 2 signals which I need to display on seven segment (3 digit number using 3 sevensegment)

I need to display a different characters on 4th seven segment for each signal value

And how can I display them circularly


Thanks
xilinx1001
 

What do you mean "display them circularly"? A circular buffer is pretty easy to implement, but I'm not sure what else you need.
Code:
type dbuff is array (0 to 7) of std_logic_vector(7 downto 0);	
signal parmbuff:dbuff;
      |
      |
      |
process(clk)
begin 
        if clk='1' and clk'event then
               parmbuff(1 to 7)<=parmbuff(0 to 6); 
               parmbuff(0)<=parmbuff(7);
       end if;
end process;
 

Hi barry,

thanks for your reply.

I need each vector(data) with a special character like a,b,c etc

How can I do this?

Thanks in advance
xilinx1001
 
Last edited:

I'm ASSUMING (since you don't explain it) that you want to alternate displaying two 3-digit signals, right? And you want a fourth character to indicate which signal you are displaying, right? If that's the case, then what you really want is a multiplexer(not a circular buffer) and two 4-vector arrays, each consisting of 3 digits and one 'character' . During the first period your display data comes from the the first array, and during the other period data comes from the other array, right?
 

Hi barry,

Exactly, this is my question

I need to display like this

How this can be done?

THANKS
xilinx1001
 

I think I just explained it. Here's a little more detail.

1) Set up two arrays that contain the 4 characters to display (3 digits + character)
2) Create four 2-input multiplexers that select the 4 characters to display
3) Create a module that will convert your 4 characters to 7-segment data (if necessary)
3a) Are you multiplexing the data to the display or driving the 4 digits directly? If multiplexing the display, you'll have to deal with that also.
4) Creating the timing signals for driving the mux.
 

Hi barry,

I am using multiplexing for 3 digits(data) to display.

so, I need to create 2 arrays now. one for character and another for 3 digits data.

And I need to write the code in a way that when 1st 3 digit data is selected then character a must display on segment . Right?
 

you need 2 arrays of four elements: each array has a character and 3 digits==>

Array 1: Ca D3a D2a D1a
Array 2: Cb D3b D2b D1b

Each of the elements maps to one of the 7-segment displays
 

Hi,

I tried to do like you said.

I defined an array and when I tried to assign the values to it like below:

type dbuff is array (0 to 3) of std_logic_vector(3 downto 0);
signal x:dbuff;
dbuff<=unit1;
dbuff<=tens1;
dbuff<=hundreds1 ;
dbuff<="0000" ;

I am getting some error like this:

Line 53. parse error, unexpected IDENTIFIER

Is this the correct way of assigning values to array


Thanks
xilinx1001
 

1) I don't know where line 53 is
2) You should be assigning the values to "x", not "dbuff". dbuff is a TYPE, x is the signal.
2) I don't know what "unit1", "tens1" etc. are. They'd better be std_logic_vector(3 downto 0).
3) I assume your assignments occur after the "begin" keyword, NOT as you've shown them.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top