new style of autoconfig 2

This commit is contained in:
MHeinrichs
2016-12-28 23:47:14 +01:00
parent 172fc9a0fd
commit 4a5666d501
+62 -85
View File
@@ -132,28 +132,30 @@ begin
lan <='0'; lan <='0';
end if; end if;
if(A(23 downto 16) = IDE_BASEADR and SHUT_UP(1) = '0')then if(A(23 downto 16) = CP_BASEADR and SHUT_UP(1) = '0')then
ide <='1';
else
ide <='0';
end if;
if(A(23 downto 16) = CP_BASEADR and SHUT_UP(2) = '0')then
cp <='1'; cp <='1';
else else
cp <='0'; cp <='0';
end if; end if;
if(A(23 downto 16) = IDE_BASEADR and SHUT_UP(2) = '0')then
ide <='1';
else
ide <='0';
end if;
end if; end if;
end process ADDRESS_DECODE; end process ADDRESS_DECODE;
--LAN interrupt enable --LAN interrupt enable
lan_int_proc: process (LAN_INT,reset) lan_int_proc: process (AMIGA_CLK,reset)
begin begin
if(reset ='0') then if(reset ='0') then
LAN_INT_ENABLE <='0'; LAN_INT_ENABLE <='0';
elsif rising_edge(LAN_INT) then elsif rising_edge(AMIGA_CLK) then
if(LAN_INT = '1') then --enable if high for the first time!
LAN_INT_ENABLE <= '1'; LAN_INT_ENABLE <= '1';
end if; end if;
end if;
end process lan_int_proc; end process lan_int_proc;
--ide --ide
@@ -216,94 +218,70 @@ begin
CP_BASEADR<=x"FF"; CP_BASEADR<=x"FF";
elsif(autoconfig= '1' and AS='0') then elsif(autoconfig= '1' and AS='0') then
if(RW='1')then if(RW='1')then
if(AUTO_CONFIG_DONE(0)='0')then
case A(6 downto 1) is case A(6 downto 1) is
when "000000" => when "000000" =>
Dout1 <= "1100" ; --ZII, System-Memory, no ROM if(AUTO_CONFIG_DONE(0)='0' or AUTO_CONFIG_DONE(1)='0')then
Dout1 <= "1100" ; --ZII, No-System-Memory, no ROM
elsif(AUTO_CONFIG_DONE(2)='0')then
Dout1 <= "110"&not(AUTOBOOT_OFF) ; --ZII, no System-Memory, (perhaps)ROM
end if;
when "000001" => Dout1 <= "0001" ; --one Card, 64KB =001 when "000001" => Dout1 <= "0001" ; --one Card, 64KB =001
when "000010" => Dout1 <= "1000" ; --ProductID high nibble : E->0001 when "000010" =>
when "000011" => Dout1 <= "0100" ; --ProductID low nibble: F->0000 if(AUTO_CONFIG_DONE(0)='0' or AUTO_CONFIG_DONE(1)='0')then
--when "0001000" => Dout1 <= "1111" ; --Config HIGH: 0x20 and no shut down Dout1 <= "1000" ; --ProductID high nibble : E->0001
--when "0001010" => Dout1 <= "1111" ; --Config LOW elsif(AUTO_CONFIG_DONE(2)='0')then
--when "0010000" => Dout1 <= "1111" ; --Ventor ID 0 Dout1 <= "1111" ; --ProductID high nibble : F->0000=0
end if;
when "000011" =>
if(AUTO_CONFIG_DONE(0)='0')then
Dout1 <= "0100" ; --ProductID low nibble: F->0000
elsif(AUTO_CONFIG_DONE(1)='0')then
Dout1 <= "0011" ; --ProductID low nibble: F->0000
elsif(AUTO_CONFIG_DONE(2)='0')then
Dout1 <= "1001" ; --ProductID low nibble: 9->0110=6
end if;
when "001000" => Dout1 <= "1111" ; --Ventor ID 0
when "001001" => Dout1 <= "0101" ; --Ventor ID 1 when "001001" => Dout1 <= "0101" ; --Ventor ID 1
when "001010" => Dout1 <= "1110" ; --Ventor ID 2 if(AUTO_CONFIG_DONE(0)='0' or AUTO_CONFIG_DONE(1)='0')then
when "001011" => Dout1 <= "0011" ; --Ventor ID 3 : $0A1C: A1K.org Dout1 <= "0101" ; --Ventor ID 1
--when "0011000" => Dout1 <= "1111" ; --Serial byte 0 (msb) high nibble elsif(AUTO_CONFIG_DONE(2)='0')then
--when "0011010" => Dout1 <= "1111" ; --Serial byte 0 (msb) low nibble Dout1 <= "0111" ; --Ventor ID 1
--when "0011100" => Dout1 <= "1111" ; --Serial byte 1 high nibble end if;
--when "0011110" => Dout1 <= "1111" ; --Serial byte 1 low nibble when "001010" =>
--when "0100000" => Dout1 <= "1111" ; --Serial byte 2 high nibble if(AUTO_CONFIG_DONE(0)='0' or AUTO_CONFIG_DONE(1)='0')then
--when "0100010" => Dout1 <= "1111" ; --Serial byte 2 low nibble Dout1 <= "1110" ; --Ventor ID 2
--when "0100100" => Dout1 <= "1111" ; --Serial byte 3 (lsb) high nibble elsif(AUTO_CONFIG_DONE(2)='0')then
--when "010001" => Dout1 <= "1000" ; --Serial byte 2 low nibble Dout1 <= "1101" ; --Ventor ID 2
when "010011" => Dout1 <= "1110" ; --Serial byte 3 (lsb) low nibble end if;
when "100000" => Dout1 <= "0000" ; --Interrupt config: all zero when "001011" =>
when "100001" => Dout1 <= "0000" ; --Interrupt config: all zero if(AUTO_CONFIG_DONE(0)='0' or AUTO_CONFIG_DONE(1)='0')then
when others => Dout1 <= "1111" ; Dout1 <= "0011" ; --Ventor ID 3 : $0A1C: A1K.org
end case; elsif(AUTO_CONFIG_DONE(2)='0')then
elsif(AUTO_CONFIG_DONE(1)='0')then Dout1 <= "0011" ; --Ventor ID 3 : $082C: BSC
case A(6 downto 1) is
when "000000" =>
if(AUTOBOOT_OFF ='0') then
Dout1 <= "1101" ; --ZII, no System-Memory, ROM
else
Dout1 <= "1100" ; --ZII, no System-Memory, no ROM
end if; end if;
when "000001" => Dout1 <= "0001" ; --one Card, 64kb = 001
--when "0000100" => Dout2 <= "1111" ; --ProductID high nibble : F->0000=0
when "000011" => Dout1 <= "1001" ; --ProductID low nibble: 9->0110=6
--when "0001000" => Dout <= "1111" ; --Config HIGH: 0x20 and no shut down
--when "0001010" => Dout2 <= "1111" ; --Config LOW
--when "0010000" => Dout2 <= "1111" ; --Ventor ID 0
when "001001" => Dout1 <= "0111" ; --Ventor ID 1
when "001010" => Dout1 <= "1101" ; --Ventor ID 2
when "001011" => Dout1 <= "0011" ; --Ventor ID 3 : $082C: BSC
when "001100" => Dout1 <= "0100" ; --Serial byte 0 (msb) high nibble when "001100" => Dout1 <= "0100" ; --Serial byte 0 (msb) high nibble
when "001101" => Dout1 <= "1110" ; --Serial byte 0 (msb) low nibble when "001101" => Dout1 <= "1110" ; --Serial byte 0 (msb) low nibble
when "001110" => Dout1 <= "1001" ; --Serial byte 1 high nibble when "001110" => Dout1 <= "1001" ; --Serial byte 1 high nibble
when "001111" => Dout1 <= "0100" ; --Serial byte 1 low nibble when "001111" => Dout1 <= "0100" ; --Serial byte 1 low nibble
--when "0100000" => Dout2 <= "1111" ; --Serial byte 2 high nibble when "010000" => Dout1 <= "1111" ; --Serial byte 2 high nibble
--when "0100010" => Dout2 <= "1111" ; --Serial byte 2 low nibble when "010001" => Dout1 <= "1111" ; --Serial byte 2 low nibble
when "010010" => Dout1 <= "0100" ; --Serial byte 3 (lsb) high nibble when "010010" => Dout1 <= "0100" ; --Serial byte 3 (lsb) high nibble
when "010011" => Dout1 <= "1010" ; --Serial byte 3 (lsb) low nibble: B16B00B5 when "010011" => Dout1 <= "1010" ; --Serial byte 3 (lsb) low nibble: B16B00B5
--when "0101000" => Dout2 <= "1111" ; --Rom vector high byte high nibble --when "010100" => Dout1 <= "1111" ; --Rom vector high byte high nibble
--when "0101010" => Dout2 <= "1111" ; --Rom vector high byte low nibble --when "010101" => Dout1 <= "1111" ; --Rom vector high byte low nibble
--when "0101100" => Dout2 <= "1111" ; --Rom vector low byte high nibble --when "010110" => Dout1 <= "1111" ; --Rom vector low byte high nibble
when "010111" => Dout1 <= "1110" ; --Rom vector low byte low nibble when "010111" =>
when "100000" => Dout1 <= "0000" ; --Interrupt config: all zero if(AUTO_CONFIG_DONE(0)='0' or AUTO_CONFIG_DONE(1)='0')then
when "100001" => Dout1 <= "0000" ; --Interrupt config: all zero Dout1 <= "1111" ; --Rom vector low byte low nibble
when others => Dout1 <= "1111" ;
end case;
elsif(AUTO_CONFIG_DONE(2)='0')then elsif(AUTO_CONFIG_DONE(2)='0')then
case A(6 downto 1) is Dout1 <= "1110" ; --Rom vector low byte low nibble
when "000000" => end if;
Dout1 <= "1100" ; --ZII, System-Memory, no ROM
when "000001" => Dout1 <= "0001" ; --one Card, 64KB =001
when "000010" => Dout1 <= "1000" ; --ProductID high nibble : E->0001
when "000011" => Dout1 <= "0011" ; --ProductID low nibble: F->0000
--when "0001000" => Dout1 <= "1111" ; --Config HIGH: 0x20 and no shut down
--when "0001010" => Dout1 <= "1111" ; --Config LOW
--when "0010000" => Dout1 <= "1111" ; --Ventor ID 0
when "001001" => Dout1 <= "0101" ; --Ventor ID 1
when "001010" => Dout1 <= "1110" ; --Ventor ID 2
when "001011" => Dout1 <= "0011" ; --Ventor ID 3 : $0A1C: A1K.org
--when "0011000" => Dout1 <= "1111" ; --Serial byte 0 (msb) high nibble
--when "0011010" => Dout1 <= "1111" ; --Serial byte 0 (msb) low nibble
--when "0011100" => Dout1 <= "1111" ; --Serial byte 1 high nibble
--when "0011110" => Dout1 <= "1111" ; --Serial byte 1 low nibble
--when "0100000" => Dout1 <= "1111" ; --Serial byte 2 high nibble
--when "0100010" => Dout1 <= "1111" ; --Serial byte 2 low nibble
--when "0100100" => Dout1 <= "1111" ; --Serial byte 3 (lsb) high nibble
--when "010001" => Dout1 <= "1000" ; --Serial byte 2 low nibble
when "010011" => Dout1 <= "1110" ; --Serial byte 3 (lsb) low nibble
when "100000" => Dout1 <= "0000" ; --Interrupt config: all zero when "100000" => Dout1 <= "0000" ; --Interrupt config: all zero
when "100001" => Dout1 <= "0000" ; --Interrupt config: all zero when "100001" => Dout1 <= "0000" ; --Interrupt config: all zero
when others => Dout1 <= "1111" ; when others => Dout1 <= "1111" ;
end case; end case;
end if; end if;
else --write if(RW='0' and UDS='0') then--write
if( UDS='0' )then
if(AUTO_CONFIG_DONE(0)='0')then if(AUTO_CONFIG_DONE(0)='0')then
if(A (6 downto 1)="100100")then if(A (6 downto 1)="100100")then
LAN_BASEADR(7 downto 0) <= D(15 downto 8); --Base adress LAN_BASEADR(7 downto 0) <= D(15 downto 8); --Base adress
@@ -316,8 +294,8 @@ begin
-- elsif(AUTO_CONFIG_DONE(1)='0')then -- elsif(AUTO_CONFIG_DONE(1)='0')then
if(AUTO_CONFIG_DONE(0)='1')then if(AUTO_CONFIG_DONE(0)='1')then
if(A (6 downto 1)="100100")then if(A (6 downto 1)="100100")then
IDE_BASEADR(7 downto 0) <= D(15 downto 8); --Base adress --CP_BASEADR(7 downto 0) <= D(15 downto 8); --Base adress
SHUT_UP(1) <= '0'; --enable board --SHUT_UP(1) <= '0'; --enable board
AUTO_CONFIG_DONE_CYCLE(1) <='1'; --done here AUTO_CONFIG_DONE_CYCLE(1) <='1'; --done here
elsif(A (6 downto 1)="100110")then elsif(A (6 downto 1)="100110")then
AUTO_CONFIG_DONE_CYCLE(1) <='1'; --done here AUTO_CONFIG_DONE_CYCLE(1) <='1'; --done here
@@ -326,7 +304,7 @@ begin
-- elsif(AUTO_CONFIG_DONE(2)='0')then -- elsif(AUTO_CONFIG_DONE(2)='0')then
if(AUTO_CONFIG_DONE(1)='1')then if(AUTO_CONFIG_DONE(1)='1')then
if(A (6 downto 1)="100100")then if(A (6 downto 1)="100100")then
CP_BASEADR(7 downto 0) <= D(15 downto 8); --Base adress IDE_BASEADR(7 downto 0) <= D(15 downto 8); --Base adress
SHUT_UP(2) <= '0'; --enable board SHUT_UP(2) <= '0'; --enable board
AUTO_CONFIG_DONE_CYCLE(2) <='1'; --done here AUTO_CONFIG_DONE_CYCLE(2) <='1'; --done here
elsif(A (6 downto 1)="100110")then elsif(A (6 downto 1)="100110")then
@@ -336,7 +314,6 @@ begin
end if; end if;
end if; end if;
end if; end if;
end if;
end process autoconfig_proc; --- that's all end process autoconfig_proc; --- that's all
LAN_WRL <= '1' when AS='0' and RW='0' and lan='1' and LDS = '0' else '0'; LAN_WRL <= '1' when AS='0' and RW='0' and lan='1' and LDS = '0' else '0';
@@ -373,7 +350,7 @@ begin
--INT_OUT <= 'Z'; --INT_OUT <= 'Z';
INT_OUT <= '0' when INT_OUT <= '0' when
(LAN_INT = '0' and LAN_INT_ENABLE ='1') or --(LAN_INT = '0' and LAN_INT_ENABLE ='1') or
CP_IRQ = '0' else 'Z'; CP_IRQ = '0' else 'Z';
OWN <= '0' when AS='0' and (autoconfig = '1' or ide = '1' or lan = '1' or cp = '1') else 'Z'; OWN <= '0' when AS='0' and (autoconfig = '1' or ide = '1' or lan = '1' or cp = '1') else 'Z';