forked from Apple-2-HW/AppleIISd
Fix in VQ44 pinning
This commit is contained in:
parent
26909735ae
commit
93cd52b99c
4
.gitignore
vendored
4
.gitignore
vendored
@ -215,3 +215,7 @@ Hardware/SD_A2\.b\$1
|
||||
|
||||
|
||||
VHDL/_pace\.ucf
|
||||
|
||||
VHDL/AppleIISd\.tim
|
||||
|
||||
VHDL/AppleIISd\.jed
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
68
VHDL/AppleIISd_VQ44.ucf
Normal file → Executable file
68
VHDL/AppleIISd_VQ44.ucf
Normal file → Executable file
@ -1,40 +1,40 @@
|
||||
#PACE: Start of Constraints generated by PACE
|
||||
|
||||
#PACE: Start of PACE I/O Pin Assignments
|
||||
NET "ADD_HIGH<10>" LOC = "P32" ;
|
||||
NET "ADD_HIGH<11>" LOC = "P38" ;
|
||||
NET "ADD_HIGH<8>" LOC = "P30" ;
|
||||
NET "ADD_HIGH<9>" LOC = "P31" ;
|
||||
NET "ADD_LOW<0>" LOC = "P12" ;
|
||||
NET "ADD_LOW<1>" LOC = "P13" ;
|
||||
NET "B<10>" LOC = "P16" ;
|
||||
NET "B<8>" LOC = "P20" ;
|
||||
NET "B<9>" LOC = "P21" ;
|
||||
NET "CARD" LOC = "P27" ;
|
||||
NET "CLK" LOC = "P37" ;
|
||||
NET "DATA<0>" LOC = "P41" ;
|
||||
NET "DATA<1>" LOC = "P42" ;
|
||||
NET "DATA<2>" LOC = "P43" ;
|
||||
NET "DATA<3>" LOC = "P44" ;
|
||||
NET "DATA<4>" LOC = "P1" ;
|
||||
NET "DATA<5>" LOC = "P3" ;
|
||||
NET "DATA<6>" LOC = "P5" ;
|
||||
NET "DATA<7>" LOC = "P7" ;
|
||||
NET "LED" LOC = "P23" ;
|
||||
NET "MISO" LOC = "P34" ;
|
||||
NET "MOSI" LOC = "P29" ;
|
||||
NET "NDEV_SEL" LOC = "P18" ;
|
||||
NET "NG" LOC = "P6" ;
|
||||
NET "NIO_SEL" LOC = "P8" ;
|
||||
NET "NIO_STB" LOC = "P36" ;
|
||||
NET "NOE" LOC = "P19" ;
|
||||
NET "NRESET" LOC = "P14" ;
|
||||
NET "NSEL" LOC = "P22" ;
|
||||
NET "NWE" LOC = "P40" ;
|
||||
NET "PHI0" LOC = "P2" ;
|
||||
NET "RNW" LOC = "P39" ;
|
||||
NET "SCLK" LOC = "P28" ;
|
||||
NET "WP" LOC = "P33" ;
|
||||
NET "ADD_HIGH<10>" LOC = "P32" ;
|
||||
NET "ADD_HIGH<11>" LOC = "P38" ;
|
||||
NET "ADD_HIGH<8>" LOC = "P30" ;
|
||||
NET "ADD_HIGH<9>" LOC = "P31" ;
|
||||
NET "ADD_LOW<0>" LOC = "P13" ;
|
||||
NET "ADD_LOW<1>" LOC = "P12" ;
|
||||
NET "B<10>" LOC = "P16" ;
|
||||
NET "B<8>" LOC = "P20" ;
|
||||
NET "B<9>" LOC = "P21" ;
|
||||
NET "CARD" LOC = "P27" ;
|
||||
NET "CLK" LOC = "P37" ;
|
||||
NET "DATA<0>" LOC = "P41" ;
|
||||
NET "DATA<1>" LOC = "P42" ;
|
||||
NET "DATA<2>" LOC = "P43" ;
|
||||
NET "DATA<3>" LOC = "P44" ;
|
||||
NET "DATA<4>" LOC = "P1" ;
|
||||
NET "DATA<5>" LOC = "P3" ;
|
||||
NET "DATA<6>" LOC = "P5" ;
|
||||
NET "DATA<7>" LOC = "P7" ;
|
||||
NET "LED" LOC = "P23" ;
|
||||
NET "MISO" LOC = "P34" ;
|
||||
NET "MOSI" LOC = "P29" ;
|
||||
NET "NDEV_SEL" LOC = "P18" ;
|
||||
NET "NG" LOC = "P6" ;
|
||||
NET "NIO_SEL" LOC = "P8" ;
|
||||
NET "NIO_STB" LOC = "P36" ;
|
||||
NET "NOE" LOC = "P19" ;
|
||||
NET "NRESET" LOC = "P14" ;
|
||||
NET "NSEL" LOC = "P22" ;
|
||||
NET "NWE" LOC = "P40" ;
|
||||
NET "PHI0" LOC = "P2" ;
|
||||
NET "RNW" LOC = "P39" ;
|
||||
NET "SCLK" LOC = "P28" ;
|
||||
NET "WP" LOC = "P33" ;
|
||||
|
||||
#PACE: Start of PACE Area Constraints
|
||||
|
||||
|
12
VHDL/AppleIISd_VQ44.xise
Normal file → Executable file
12
VHDL/AppleIISd_VQ44.xise
Normal file → Executable file
@ -105,7 +105,7 @@
|
||||
<property xil_pn:name="Launch SDK after Export" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Library for Verilog Sources" xil_pn:value="" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Load glbl" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Logic Optimization" xil_pn:value="Speed" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Logic Optimization" xil_pn:value="Density" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="Macro Preserve" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Macrocell Power Setting" xil_pn:value="Std" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Manual Implementation Compile Order" xil_pn:value="false" xil_pn:valueState="default"/>
|
||||
@ -114,7 +114,7 @@
|
||||
<property xil_pn:name="Mux Extraction" xil_pn:value="Yes" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Netlist Hierarchy" xil_pn:value="As Optimized" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Optimization Effort" xil_pn:value="Normal" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Optimization Goal" xil_pn:value="Speed" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Optimization Goal" xil_pn:value="Area" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="Other CPLD Fitter Command Line Options" xil_pn:value="" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Other Compiler Options" xil_pn:value="" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Other Compiler Options Fit" xil_pn:value="" xil_pn:valueState="default"/>
|
||||
@ -177,9 +177,9 @@
|
||||
<property xil_pn:name="Use Custom Waveform Configuration File Behav" xil_pn:value="false" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use Custom Waveform Configuration File Fit" xil_pn:value="false" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use FSM Explorer Data" xil_pn:value="true" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="Use Global Clocks" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use Global Output Enables" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use Global Set/Reset" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use Global Clocks" xil_pn:value="false" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="Use Global Output Enables" xil_pn:value="false" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="Use Global Set/Reset" xil_pn:value="false" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="Use Location Constraints" xil_pn:value="Always" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use Multi-level Logic Optimization" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Use Smart Guide" xil_pn:value="false" xil_pn:valueState="default"/>
|
||||
@ -194,7 +194,7 @@
|
||||
<property xil_pn:name="WYSIWYG" xil_pn:value="None" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="Working Directory" xil_pn:value="." xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="XOR Preserve" xil_pn:value="true" xil_pn:valueState="default"/>
|
||||
<property xil_pn:name="iMPACT Project File" xil_pn:value="AppleIISd.ipf" xil_pn:valueState="non-default"/>
|
||||
<property xil_pn:name="iMPACT Project File" xil_pn:value="AppleIISd_VQ44.ipf" xil_pn:valueState="non-default"/>
|
||||
<!-- -->
|
||||
<!-- The following properties are for internal use only. These should not be modified.-->
|
||||
<!-- -->
|
||||
|
36
VHDL/SpiController.vhd
Normal file → Executable file
36
VHDL/SpiController.vhd
Normal file → Executable file
@ -28,9 +28,6 @@ Port (
|
||||
pgm_en : out STD_LOGIC;
|
||||
led : out STD_LOGIC
|
||||
);
|
||||
|
||||
constant DIV_WIDTH : integer := 3;
|
||||
|
||||
end SpiController;
|
||||
|
||||
architecture Behavioral of SpiController is
|
||||
@ -49,7 +46,6 @@ architecture Behavioral of SpiController is
|
||||
signal frx: std_logic; -- fast receive mode
|
||||
signal ece: std_logic; -- external clock enable; 0=phi2, 1=external clock
|
||||
|
||||
signal divisor: std_logic_vector(DIV_WIDTH-1 downto 0);
|
||||
signal slavesel: std_logic := '1'; -- slave select output (0=selected)
|
||||
signal int_miso: std_logic;
|
||||
--------------------------
|
||||
@ -63,8 +59,6 @@ architecture Behavioral of SpiController is
|
||||
|
||||
-- spi clock
|
||||
signal clksrc: std_logic; -- clock source (phi2 or clk_7m)
|
||||
-- TODO divcnt is not used at all??
|
||||
--signal divcnt: std_logic_vector(DIV_WIDTH-1 downto 0); -- divisor counter
|
||||
signal shiftclk : std_logic;
|
||||
|
||||
begin
|
||||
@ -172,22 +166,8 @@ begin
|
||||
clksrc <= phi0 when (ece = '0') else clk;
|
||||
|
||||
-- is a pulse signal to allow for divisor==0
|
||||
--shiftclk <= clksrc when divcnt = "000000" else '0';
|
||||
shiftclk <= clksrc when bsy = '1' else '0';
|
||||
|
||||
-- clkgen: process(nreset, divisor, clksrc)
|
||||
-- begin
|
||||
-- if (nreset = '0') then
|
||||
-- divcnt <= divisor;
|
||||
-- elsif (falling_edge(clksrc)) then
|
||||
-- if (shiftclk = '1') then
|
||||
-- divcnt <= divisor;
|
||||
-- else
|
||||
-- divcnt <= divcnt - 1;
|
||||
-- end if;
|
||||
-- end if;
|
||||
-- end process;
|
||||
|
||||
--------------------------
|
||||
-- interface section
|
||||
-- inputs
|
||||
@ -210,7 +190,7 @@ begin
|
||||
-- cpu register section
|
||||
-- cpu read
|
||||
cpu_read: process(addr, spidatain, tc, bsy, frx, pgmen,
|
||||
ece, divisor, slavesel, wp, card, sdhc, inited)
|
||||
ece, slavesel, wp, card, sdhc, inited)
|
||||
begin
|
||||
case addr is
|
||||
when "00" => -- read SPI data in
|
||||
@ -223,10 +203,8 @@ begin
|
||||
data_out(4) <= frx;
|
||||
data_out(5) <= bsy;
|
||||
data_out(6) <= '0';
|
||||
data_out(7) <= tc;
|
||||
when "10" => -- read sclk divisor
|
||||
data_out(DIV_WIDTH-1 downto 0) <= divisor;
|
||||
data_out(7 downto 3) <= (others => '0');
|
||||
data_out(7) <= tc;
|
||||
-- no register 2
|
||||
when "11" => -- read slave select / slave interrupt state
|
||||
data_out(0) <= slavesel;
|
||||
data_out(3 downto 1) <= (others => '0');
|
||||
@ -246,7 +224,6 @@ begin
|
||||
ece <= '0';
|
||||
frx <= '0';
|
||||
slavesel <= '1';
|
||||
divisor <= (others => '0');
|
||||
spidataout <= (others => '1');
|
||||
sdhc <= '0';
|
||||
inited <= '0';
|
||||
@ -262,10 +239,9 @@ begin
|
||||
pgmen <= data_in(0);
|
||||
ece <= data_in(2);
|
||||
frx <= data_in(4);
|
||||
-- no bit 5 - 7
|
||||
when "10" => -- write divisor
|
||||
divisor <= data_in(DIV_WIDTH-1 downto 0);
|
||||
when "11" => -- write slave select / slave interrupt enable
|
||||
-- no bit 5 - 7
|
||||
-- no register 2
|
||||
when "11" => -- write slave select
|
||||
slavesel <= data_in(0);
|
||||
-- no bit 1 - 3
|
||||
sdhc <= data_in(4);
|
||||
|
Loading…
Reference in New Issue
Block a user