emmagood
Member level 4
- Joined
- Feb 13, 2010
- Messages
- 74
- Helped
- 3
- Reputation
- 6
- Reaction score
- 1
- Trophy points
- 1,288
- Activity points
- 1,849
Hello there,
I have a FPGA board which has 4 seven segment elements having all the elements connected in parallel ie. element 'a' of all four units are in parallel and so on. I wanted to display four distinct characters in the four units viz 'F.P.g.A.'. Is there any way to do so.
I tried the following way:
Described a process A which is level sensitive to clock (level --> high) and activates the unit A of seven segment displaying 'F.' This works.
Then, I described a process B which is level sensitive to clock (level --> low) to activate the unit B of seven segment for displaying 'P.' At this time segment A is switched off.
This part does not work. I was expecting that since the 7 segment elements will be switching at high speed (clk = 8 Mhz.) I will be able to see both 'F.' and 'P.' on the consecutive units.
The code is as below (for all four units) :
-------------------------------
entity fpga_display is
Port ( ca,cb,cc,cd : out STD_LOGIC;
clk,rst : in STD_LOGIC;
segment7 : out STD_LOGIC_VECTOR (7 downto 0));
end fpga_display;
architecture Behavioral of fpga_display is
signal not_clk : std_logic;
signal segment7_temp : std_logic_vector(7 downto 0);
signal ca_temp, cb_temp, cc_temp, cd_temp : std_logic;
begin
not_clk <= not clk ;
A: process (clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (clk ='0')then
segment7_temp <= "11100011";
ca_temp <='1'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
end if;
end process A;
------------------------------
B: process (clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (clk='1') then
segment7_temp <= "11100111";
ca_temp <='0'; cb_temp <= '1'; cc_temp <= '0'; cd_temp <= '0';
end if;
end process B;
------------------------------
C: process (not_clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (not_clk = '0') then
segment7_temp <= "11011111";
ca_temp <='0'; cb_temp <= '0'; cc_temp <= '1'; cd_temp <= '0';
end if;
end process C;
-----------------------------
D: process (not_clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (not_clk = '1') then
segment7_temp <= "11101111";
ca_temp <='0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '1';
end if;
end process D;
----------------------------
segment7 <= segment7_temp;
ca <= ca_temp;
cb <= cb_temp;
cc <= cc_temp;
cd <= cd_temp;
end Behavioral;
-------------------------------
For 'g.' and 'A.', I tried by using a not_clk.
Pls. advise if this is the right technique / of any other technique to display distinct elements on the 4 parallel connected seven segment display.
BTW though there are no error, there were a few warning :
WARNING:Xst:737 - Found 1-bit latch for signal <cb_temp>.
WARNING:Xst:737 - Found 1-bit latch for signal <cc_temp>.
WARNING:Xst:737 - Found 1-bit latch for signal <cd_temp>.
WARNING:Xst:737 - Found 1-bit latch for signal <ca_temp>.
WARNINGar:276 - The signal clk_IBUF has no load
WARNINGar:276 - The signal rst_IBUF has no load
WARNINGar:284 - There are 2 sourceless or loadless signals in this design.
WARNINGhysDesignRules:367 - The signal <clk_IBUF> is incomplete. The signal
WARNINGhysDesignRules:367 - The signal <rst_IBUF> is incomplete. The signal
(Only the first warning came when process A was run)
Thanks,
Emma Good.
I have a FPGA board which has 4 seven segment elements having all the elements connected in parallel ie. element 'a' of all four units are in parallel and so on. I wanted to display four distinct characters in the four units viz 'F.P.g.A.'. Is there any way to do so.
I tried the following way:
Described a process A which is level sensitive to clock (level --> high) and activates the unit A of seven segment displaying 'F.' This works.
Then, I described a process B which is level sensitive to clock (level --> low) to activate the unit B of seven segment for displaying 'P.' At this time segment A is switched off.
This part does not work. I was expecting that since the 7 segment elements will be switching at high speed (clk = 8 Mhz.) I will be able to see both 'F.' and 'P.' on the consecutive units.
The code is as below (for all four units) :
-------------------------------
entity fpga_display is
Port ( ca,cb,cc,cd : out STD_LOGIC;
clk,rst : in STD_LOGIC;
segment7 : out STD_LOGIC_VECTOR (7 downto 0));
end fpga_display;
architecture Behavioral of fpga_display is
signal not_clk : std_logic;
signal segment7_temp : std_logic_vector(7 downto 0);
signal ca_temp, cb_temp, cc_temp, cd_temp : std_logic;
begin
not_clk <= not clk ;
A: process (clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (clk ='0')then
segment7_temp <= "11100011";
ca_temp <='1'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
end if;
end process A;
------------------------------
B: process (clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (clk='1') then
segment7_temp <= "11100111";
ca_temp <='0'; cb_temp <= '1'; cc_temp <= '0'; cd_temp <= '0';
end if;
end process B;
------------------------------
C: process (not_clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (not_clk = '0') then
segment7_temp <= "11011111";
ca_temp <='0'; cb_temp <= '0'; cc_temp <= '1'; cd_temp <= '0';
end if;
end process C;
-----------------------------
D: process (not_clk, rst)
begin
if(rst = '0')then
ca_temp <= '0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '0';
elsif (not_clk = '1') then
segment7_temp <= "11101111";
ca_temp <='0'; cb_temp <= '0'; cc_temp <= '0'; cd_temp <= '1';
end if;
end process D;
----------------------------
segment7 <= segment7_temp;
ca <= ca_temp;
cb <= cb_temp;
cc <= cc_temp;
cd <= cd_temp;
end Behavioral;
-------------------------------
For 'g.' and 'A.', I tried by using a not_clk.
Pls. advise if this is the right technique / of any other technique to display distinct elements on the 4 parallel connected seven segment display.
BTW though there are no error, there were a few warning :
WARNING:Xst:737 - Found 1-bit latch for signal <cb_temp>.
WARNING:Xst:737 - Found 1-bit latch for signal <cc_temp>.
WARNING:Xst:737 - Found 1-bit latch for signal <cd_temp>.
WARNING:Xst:737 - Found 1-bit latch for signal <ca_temp>.
WARNINGar:276 - The signal clk_IBUF has no load
WARNINGar:276 - The signal rst_IBUF has no load
WARNINGar:284 - There are 2 sourceless or loadless signals in this design.
WARNINGhysDesignRules:367 - The signal <clk_IBUF> is incomplete. The signal
WARNINGhysDesignRules:367 - The signal <rst_IBUF> is incomplete. The signal
(Only the first warning came when process A was run)
Thanks,
Emma Good.