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 write a VHDL source code to use the SPARTAN 3 memory ?

Status
Not open for further replies.

ryoban

Newbie level 4
Joined
Dec 8, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,361
HI,
i just want think you for advise. You asked me to give you the vhdl source code that i want to use.here it is:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity leccd1 is
Port ( d : in std_logic_vector(3 downto 0);
s : out std_logic_vector(6 downto 0);
i : in std_logic;
o : out std_logic
);
end leccd1;

architecture Behavioral of leccd1 is

begin
o<='0' when i='1' else '1';
s <="1110111" when d="0000" else
"0010010" when d="0001" else
"1011101" when d="0010" else
"1011011" when d="0011" else
"0111010" when d="0100" else
"1101011" when d="0101" else
"1101111" when d="0110" else
"1010010" when d="0111" else
"1111111" when d="1000" else
"1111011" when d="1001" else
"1111110" when d="1010" else
"0101111" when d="1011" else
"0001101" when d="1100" else
"0011111" when d="1101" else
"1101101" when d="1110" else
"1101100";

end Behavioral;

entity displaycountf is
Port ( clk : in std_logic;
count : out std_logic_vector(3 downto 0));
end displaycountf;

architecture Behavioral of displaycountf is
signal cnt: std_logic_vector(27 downto 0);
begin
process(clk)
begin
if clk'event and clk='0' then
cnt<= cnt + 1 ;
end if;
end process ;
count(3 downto 0)<= cnt(27 downto 24);
end Behavioral;

in fact i want to use four of this counter to count from 0000 to 9999 and these nombers will be displayed the lcd of the spartan 3 starter board. and when there is no light i want the value to be keep in the memory and it will be pisplayed when the light come back and the counteur will cotinue to count from this value.

so please help me to do this, and to know how i can write a vhdl source code to use the SPARTAN 3 memory ,where i want to write when there is no light,and when the light come back i whant to read the previous memorised data and display it. ::cry:
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top