L
lc
Guest
Hello,
I implemented in a CPLD a very simple 8bit output port
The CPLD connects to the microcontroller bus and this part
is simply a latch that is controlled by the address bus and /wr
signal. Couldn't be simpler.
I had a 'testpoint' out of the CPLD just to check when this latch
is gated.
All works fine.
When I sad to myself that I no longer need the testpoint, and removed
the VHDL line, the port stopped to work !!!
I changed nothing else !!!!
Put back the test point and the port worked again !!!
This is crazy !
Anyone has a clue about what is happening ?
Help is appreciated, I may leave the testpoint there
but I want to understand what is going on !
(using Max+Plus II 10.2BL and a MAX7128SQC100-15)
the relevant part of the VHDL code follows:
--------------------------------------------
....
-- this is the test point I'm talking about inspecting the
"write_to_the_port" signal
PF(0) <= ga_class_wr;
-- end of debug area
octnr <= conv_integer( unsigned( a(10 downto 8) ) );
ga_class_wr <= '1' WHEN ((a(15 downto 11) = GA_PORTS) AND nwr='0') ELSE '0';
ga_class_rd <= '1' WHEN ((a(15 downto 11) = GA_PORTS) AND nrd='0') ELSE '0';
PA<= par;
PB<= pbr;
PE<= per;
pcr<=PC;
pdr<=PD;
-- latching cpu bus writes
cpuio: PROCESS(ga_class_rd,ga_class_wr,d)
VARIABLE wrdata: STD_LOGIC_VECTOR (7 downto 0);
BEGIN
IF (ga_class_wr='1') THEN
CASE octnr IS
WHEN 0 => par<=d;
WHEN 1 => pbr<=d;
WHEN 4 => per<=d;
WHEN OTHERS =>
END CASE;
end if;
IF (ga_class_rd='1') THEN
CASE octnr IS
WHEN 2 => wrdata := pcr;
WHEN 3 => wrdata := pdr;
WHEN OTHERS =>
END CASE;
d <= wrdata;
ELSE
d <= "ZZZZZZZZ";
END IF;
END PROCESS cpuio;
I implemented in a CPLD a very simple 8bit output port
The CPLD connects to the microcontroller bus and this part
is simply a latch that is controlled by the address bus and /wr
signal. Couldn't be simpler.
I had a 'testpoint' out of the CPLD just to check when this latch
is gated.
All works fine.
When I sad to myself that I no longer need the testpoint, and removed
the VHDL line, the port stopped to work !!!
I changed nothing else !!!!
Put back the test point and the port worked again !!!
This is crazy !
Anyone has a clue about what is happening ?
Help is appreciated, I may leave the testpoint there
but I want to understand what is going on !
(using Max+Plus II 10.2BL and a MAX7128SQC100-15)
the relevant part of the VHDL code follows:
--------------------------------------------
....
-- this is the test point I'm talking about inspecting the
"write_to_the_port" signal
PF(0) <= ga_class_wr;
-- end of debug area
octnr <= conv_integer( unsigned( a(10 downto 8) ) );
ga_class_wr <= '1' WHEN ((a(15 downto 11) = GA_PORTS) AND nwr='0') ELSE '0';
ga_class_rd <= '1' WHEN ((a(15 downto 11) = GA_PORTS) AND nrd='0') ELSE '0';
PA<= par;
PB<= pbr;
PE<= per;
pcr<=PC;
pdr<=PD;
-- latching cpu bus writes
cpuio: PROCESS(ga_class_rd,ga_class_wr,d)
VARIABLE wrdata: STD_LOGIC_VECTOR (7 downto 0);
BEGIN
IF (ga_class_wr='1') THEN
CASE octnr IS
WHEN 0 => par<=d;
WHEN 1 => pbr<=d;
WHEN 4 => per<=d;
WHEN OTHERS =>
END CASE;
end if;
IF (ga_class_rd='1') THEN
CASE octnr IS
WHEN 2 => wrdata := pcr;
WHEN 3 => wrdata := pdr;
WHEN OTHERS =>
END CASE;
d <= wrdata;
ELSE
d <= "ZZZZZZZZ";
END IF;
END PROCESS cpuio;