Welcome, Guest. Please login or register.

Author Topic: Minimig PCB run - interest thread  (Read 37272 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline TobiFlex

  • Jr. Member
  • **
  • Join Date: Jan 2006
  • Posts: 53
    • Show only replies by TobiFlex
Re: ps
« Reply #539 from previous page: November 02, 2007, 07:06:07 AM »
Quote

little wrote:
...if the 68k is succesfully placed inside the FPGA...


The 68K is succesfully placed inside the FPGA by me! Also the SDRAM Controller and the Spihost for floppy emulation! You can try it if you have a DE2 Board from Terasic.

I hope i can finish the port for the DE1 Board next week.

Viele Grüße
TobiFlex
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: ps
« Reply #540 on: November 02, 2007, 10:12:38 AM »
Are you going to release details about the modification to MiniMig core to use an SDRAM controller rather than SRAM?

Doesnt have to be "code", just in overview.

How does latency and burstiness affect things? Did you run the SDRAM at a multiple of the MiniMig core frequency?

Has anyone looked at PSRAM (Pseudo SRAM) as a viable alternative to minimig's SRAM? I think they are cheaper, larger, and would work just like SRAM. Perhaps a very "quick n dirty" alternative.
 

Offline little

  • Full Member
  • ***
  • Join Date: Sep 2007
  • Posts: 223
    • Show only replies by little
Re: ps
« Reply #541 on: November 02, 2007, 03:37:23 PM »
Quote

TobiFlex wrote:
The 68K is succesfully placed inside the FPGA by me! Also the SDRAM Controller and the Spihost for floppy emulation! You can try it if you have a DE2 Board from Terasic.

I hope i can finish the port for the DE1 Board next week.

Viele Grüße
TobiFlex

Cool! Please keep us posted :-)

As a side note, can anyone tell me if it would be posible to make this external parallel port floppy drives read amiga formatted disks? If it would be posible then a parallel port would be the best option, specialy since it might be feasible to dinamically change it from parallel to scsi :-D
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: ps
« Reply #542 on: November 02, 2007, 09:07:00 PM »
Quote

little wrote:
As a side note, can anyone tell me if it would be posible to make this external parallel port floppy drives read amiga formatted disks?

No. It probably would not be possible.

It depends on the capabilities of the floppy to parallel port chip inside. Most are very PC 1.44Mb orientated.

No-one has _ever_ been able to make one of these drives read Amiga disks when connected to a PC and hence the reason for Catweasel controllers.

It would not be suitable for DF0, connected to a minimig via it's parallel port.

A regular PC internal floppy disk (or a DELL external laptop disk) would be perfect though.

Traditionally you cannot use PC 1.44mb floppy drives on a real Amiga because the 2x rotational speed of these drives means the data is 2x bandwidth and the Paula chip(?) cannot cope. This limitation can be removed in MiniMig.
 

Offline TobiFlex

  • Jr. Member
  • **
  • Join Date: Jan 2006
  • Posts: 53
    • Show only replies by TobiFlex
Re: ps
« Reply #543 on: November 02, 2007, 10:34:11 PM »
Quote

alexh wrote:
Are you going to release details about the modification to MiniMig core to use an SDRAM controller rather than SRAM?

Doesnt have to be "code", just in overview.

How does latency and burstiness affect things? Did you run the SDRAM at a multiple of the MiniMig core frequency?

 


Hi alexh,
I don't know how exactly i can help you?
The sdram clock is 7,09Mhzx16=113MHz. I have remove the DCM from the minimig source and all clocks came from the SDRAM Controller. So I have a synchron design. Look into the attatched code. The C_7m is the clock for the minimig. If it is Low The Controller Read or Write Minimig data. If it is high the Controller read or write spihost data.
the latency is 2 and the read burst is 4.

The Spihost works with the nice old Z80 but with the power of 60MHz. For the Z80 the controller also cache 8 opcode bytes.
If i use also cache opcodes for the 68K i can make the minimig 2-4x faster i think.

Code: [Select]


--
-- Copyright (c) 2006-2007 Tobias Gubener
--
-- All rights reserved
--
-- Redistribution and use in source and synthezised forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- Redistributions of source code must retain the above copyright notice,
-- this list of conditions and the following disclaimer.
--
-- Redistributions in synthesized form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in the
-- documentation and/or other materials provided with the distribution.
--
-- Neither the name of the author nor the names of other contributors may
-- be used to endorse or promote products derived from this software without
-- specific prior written permission.
--
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-- PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
-- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-- POSSIBILITY OF SUCH DAMAGE.
--

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity sdram is
port
(
sdata : inout std_logic_vector(15 downto 0);
sdaddr : out std_logic_vector(12 downto 0);
dqm : out std_logic_vector(3 downto 0);
sd_cs : out std_logic_vector(3 downto 0);
ba : buffer std_logic_vector(1 downto 0);
sd_we : out std_logic;
sd_ras : out std_logic;
sd_cas : out std_logic;

sysclk : in std_logic;
reset : in std_logic;

zdatawr : in std_logic_vector(7 downto 0);
zAddr : in std_logic_vector(22 downto 0);
zwr : in std_logic;
datawr : in std_logic_vector(15 downto 0);
rAddr : in std_logic_vector(22 downto 0);
rwr : in std_logic;
dwrL : in std_logic;
dwrU : in std_logic;
zstate : in std_logic_vector(2 downto 0);

dataout : out std_logic_vector(15 downto 0);
zdataout : out std_logic_vector(7 downto 0);
c_56m : out std_logic;
zena_o : out std_logic;
c_28m : out std_logic;
c_7m : out std_logic;
reset_out : out std_logic
);
end;

architecture rtl of sdram is


signal initstate :std_logic_vector(3 downto 0);
signal slow :std_logic_vector(7 downto 0);
signal pass :std_logic_vector(1 downto 0);
signal datard :std_logic;
signal sdcom_ena :std_logic;
signal isd_ras :std_logic;
signal isd_cas :std_logic;
signal isd_we :std_logic;
signal nanostate :std_logic_vector(3 downto 0);
signal ras_pos :std_logic;
signal wr_int :std_logic;
signal rd_int :std_logic;
signal init_done :std_logic;
signal Addr :std_logic_vector(22 downto 0);
signal isdaddr :std_logic_vector(12 downto 0);
signal isd_cs :std_logic_vector(3 downto 0);
signal datain :std_logic_vector(15 downto 0);
signal casaddr :std_logic_vector(10 downto 0);
signal casba :std_logic_vector(1 downto 0);
signal wr :std_logic;
signal sdwrite :std_logic;
signal nextpix :std_logic_vector(15 downto 0);


signal zena :std_logic;
signal zcache :std_logic_vector(63 downto 0);
signal zcache_addr :std_logic_vector(22 downto 0);
signal zcache_recall :std_logic;
signal fill_zcache :std_logic;
signal match_zcache :std_logic;
signal zvalid :std_logic;
signal zequal :std_logic;

signal V_cycle :std_logic;
signal T_cycle :std_logic;
signal R_cycle :std_logic;
signal Z_cycle :std_logic;

begin

Addr <= rAddr when R_cycle='1' else zAddr;
wr <= '0' when (R_cycle='1' AND rwr='0') OR (Z_cycle='1' AND zwr='0') else '1';
c_7m <= T_cycle;

sd_ras <= isd_ras or sdcom_ena;
sd_cas <= isd_cas or sdcom_ena;
sd_we  <= isd_we  or sdcom_ena;
sdaddr <= isdaddr;
sd_cs <= isd_cs when sdcom_ena='0' else &quot;1111&quot;;

zena_o <= '1' when zena='1' or match_zcache='1' else '0';

reset_out <= init_done AND reset;

process (sysclk, zAddr, zcache_addr, zcache, zstate, zequal, zvalid, match_zcache, nextpix) begin
if zaddr(22 downto 3)=zcache_addr(22 downto 3) then
zequal <='1';
else
zequal <='0';
end if;
if (zstate(2)='1' or zstate(1 downto 0)=&quot;01&quot; or (zstate=&quot;00&quot; and zequal='1' and zvalid='1')) then
match_zcache <='1';
else
match_zcache <='0';
end if;
case match_zcache&(zaddr(2 downto 1)-zcache_addr(2 downto 1)) is
when &quot;100&quot;=>
if zaddr(0)='1' then
zdataout <= zcache(55 downto 48);
else
zdataout <= zcache(63 downto 56);
end if;
when &quot;101&quot;=>
if zaddr(0)='1' then
zdataout <= zcache(39 downto 32);
else
zdataout <= zcache(47 downto 40);
end if;
when &quot;110&quot;=>
if zaddr(0)='1' then
zdataout <= zcache(23 downto 16);
else
zdataout <= zcache(31 downto 24);
end if;
when &quot;111&quot;=>
if zaddr(0)='1' then
zdataout <= zcache(7 downto 0);
else
zdataout <= zcache(15 downto 8);
end if;
when others=>
if zaddr(0)='1' then
zdataout <= nextpix(7 downto 0);
else
zdataout <= nextpix(15 downto 8);
end if;

end case;
end process;

process (sysclk) begin
if (sysclk'event and sysclk='1') then
if nanostate(2 downto 0)=&quot;111&quot; then
R_cycle <= '0';
V_cycle <= '0';
T_cycle <= '1';
Z_cycle <= '0';

IF slow(2 downto 0)=5 THEN
slow <= slow+3;
ELSE
slow <= slow+1;
END IF;
case slow(3 downto 0) is
when &quot;0001&quot; => V_cycle <= '1'; --refresh cycle
when &quot;0000&quot;|&quot;1000&quot;|&quot;0010&quot;|&quot;0100&quot;|&quot;1010&quot;|&quot;1100&quot; => R_cycle <= '1';
 T_cycle <= '0';
when others =>  Z_cycle <= '1';
end case;
end if;
end if;
end process;


--Datenübernahme
process (sysclk, reset) begin
if reset = '0' then
zcache_recall <= '0';
zvalid <= '0';
zena <= '0';

elsif (sysclk'event and sysclk='1') then
nextpix <= sdata;
if zequal='1' and zstate=&quot;11&quot; then
zvalid <= '0';
end if;
case nanostate(2 downto 0) is
when &quot;000&quot; =>
c_56m <= '0';
if fill_zcache='1' then
zcache(47 downto 32) <= nextpix;
end if;
when &quot;001&quot; =>
c_28m <= '0';
c_56m <= '1';
if fill_zcache='1' then
zcache(31 downto 16) <= nextpix;
end if;
when &quot;010&quot; =>
zcache_recall <= match_zcache;
c_56m <= '0';
if fill_zcache='1' then
zcache(15 downto 0) <= nextpix;
end if;
fill_zcache <= '0';
when &quot;011&quot; =>
c_28m <= '1';
c_56m <= '1';
if Z_cycle='1'  then
if zcache_recall='0' then
zena <= '1';
if zstate=&quot;00&quot; then
zcache_addr <= zaddr;
fill_zcache <= '1';
zvalid <= '1';
end if;
end if;
end if;
when &quot;100&quot; =>
c_56m <= '0';
when &quot;101&quot; =>
c_28m <= '0';
c_56m <= '1';
when &quot;110&quot; =>
c_56m <= '0';
if fill_zcache='1' then
zcache(63 downto 48) <= sdata;
end if;
if R_cycle='1' then
dataout <= sdata;
end if;
when &quot;111&quot; =>
c_28m <= '1';
zena <= '0';
c_56m <= '1';
when others =>
end case;
end if;
end process;



process (sysclk, reset, sdwrite, datain) begin
IF sdwrite='1' THEN
sdata <= datain;
ELSE
sdata <= &quot;ZZZZZZZZZZZZZZZZ&quot;;
END IF;
if reset = '0' then
initstate <= (others => '0');
init_done <= '0';
nanostate <= &quot;0000&quot;;
else
if (sysclk'event and sysclk='1') then
sdcom_ena <= '1';
ras_pos <= '0';
nanostate <='0'&nanostate(2 downto 0)+1;
if ras_pos='1' then
casaddr <= addr(10 downto 0);
casba <= ba;
IF R_cycle='1' THEN
datain <= datawr;
ELSE
datain <= zdatawr&zdatawr;
END IF;
end if;
case nanostate(2 downto 0) is --LATENCY=2
when &quot;000&quot; => pass <= &quot;00&quot;;
when &quot;001&quot; => sdcom_ena <= '0';
ras_pos <= '1';
when &quot;010&quot; => pass <= &quot;01&quot;;
sdwrite <= '1';
if V_cycle='1' then
wr_int <= '1';
rd_int <= '1';
else
wr_int <= wr ;
rd_int <= '0';
end if;
when &quot;011&quot; =>
sdcom_ena <= '0';
when &quot;100&quot; =>
pass <= &quot;11&quot;;
sdwrite <= '0';
when &quot;101&quot; =>  
when &quot;110&quot; =>
when &quot;111&quot; =>
if initstate /= &quot;1111&quot; then
initstate <= initstate+1;
else
init_done <='1';
end if;
when others =>
end case;
end if;
end if;
end process;



process (initstate, pass, addr, wr, datain, init_done, casaddr, rd_int, wr_int, dwrU, dwrL, casba, Z_cycle, V_cycle, zaddr) begin
isdaddr<=&quot;XXXXXXXXXXXXX&quot;;
isd_cs <= &quot;1111&quot;; --NOP
isd_ras <= '1';
isd_cas <= '1';
isd_we <= '1';
ba <= Addr(22 downto 21);

if wr_int='0' then
if Z_cycle='1' THEN
dqm <= (&quot;11&quot;&  zaddr(0)& not zaddr(0));
else
dqm <= (&quot;11&quot;&  dwrU& dwrL);
end if;
else
dqm <= &quot;1100&quot;;
end if;



if init_done='0' then
case initstate & pass is
when &quot;001000&quot; => --PRECHARGE
isdaddr(10) <= '1'; --all banks
isd_cs <=&quot;0000&quot;;
isd_ras <= '0';
isd_cas <= '1';
isd_we <= '0';
when &quot;001100&quot;|&quot;010000&quot;|&quot;010100&quot;|&quot;011000&quot;|&quot;011100&quot;|&quot;100000&quot;|&quot;100100&quot;|&quot;101000&quot;|&quot;101100&quot;|&quot;110000&quot; => --AUTOREFRESH
isd_cs <=&quot;0000&quot;;
isd_ras <= '0';
isd_cas <= '0';
isd_we <= '1';
when &quot;110100&quot; => --LOAD MODE REGISTER
isd_cs <=&quot;0000&quot;;
isd_ras <= '0';
isd_cas <= '0';
isd_we <= '0';
ba <= &quot;00&quot;;
isdaddr <= &quot;0001000100010&quot;; --BURST=4 LATENCY=2
when others => --NOP
end case;
else
case pass is
when &quot;00&quot; => --ACTIVE
isdaddr <= &quot;0&quot;& addr(20 downto 9);
isd_ras <= '0';
isd_we <= '1';
if V_cycle='1' then
isd_cs <=&quot;0000&quot;; --AUTOREFRESH
isd_cas <= '0';
else
isd_cas <= '1';
isd_cs <= &quot;1110&quot;; --ACTIVE
end if;
when &quot;01&quot; => --READ or Write
ba <= casba;
isdaddr <= '0'& '0' & '1' & &quot;00&quot; & casaddr(8 downto 1);--auto precharge
isd_cs <= &quot;1110&quot;;
isd_ras <= '1';
isd_cas <= rd_int;
isd_we  <= wr_int;
when others => --NOP
end case;
end if;
end process;
end;
 

Offline little

  • Full Member
  • ***
  • Join Date: Sep 2007
  • Posts: 223
    • Show only replies by little
Re: ps
« Reply #544 on: November 03, 2007, 04:49:43 AM »
Quote
A regular PC internal floppy disk (or a DELL external laptop disk) would be perfect though.

Mhhh, how about adding a selector header (like the one that selects 15/31 khz) to select if the minimig has an active internal floppy interface or an active external parallel port? Chances are people will not need both (or at least will not use both at the same time).

Just thinking out loud, as usual  :-)
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: ps
« Reply #545 on: November 03, 2007, 10:11:03 AM »
little wrote:
Quote
how about adding a selector header (like the one that selects 15/31 khz) to select if the minimig has an active internal floppy interface or an active external parallel port? Chances are people will not need both (or at least will not use both at the same time)

I think Parallel port and external floppy disk drive are the the same connector.

http://www.amiga-hardware.com/download_photos/a500_4_big.jpg

If you had a minimig with this connector (and an FPGA with enough I/O) All you need is a different MiniMig "image" on the SD card to switch between parallel port or real floppy disk.
 

Offline little

  • Full Member
  • ***
  • Join Date: Sep 2007
  • Posts: 223
    • Show only replies by little
Re: ps
« Reply #546 on: November 03, 2007, 01:19:55 PM »
Quote

alexh wrote:
I think Parallel port and external floppy disk drive are the the same connector.


Sadly, the amiga external floppy port is a db23 and not a db25. Besides amiga external drives (low or high density) are expensive and hard to get, while internal pc floppy drives are cheap and easy to get, that is why I though of an internal floppy interface.

Quote
If you had a minimig with this connector (and an FPGA with enough I/O) All you need is a different MiniMig "image" on the SD card to switch between parallel port or real floppy disk.

That would be cool!
 

Offline asymetrix

  • Full Member
  • ***
  • Join Date: May 2007
  • Posts: 118
    • Show only replies by asymetrix
Re: ps
« Reply #547 on: December 12, 2008, 03:02:16 PM »
I was looking at Actels IGLOO PLUS FPGAs, can any of these FPGAs be used for future Minimigs ?

They are very cheap - some as low as $1 :)

IGLOO SERIES
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: ps
« Reply #548 on: December 12, 2008, 05:42:54 PM »
You might be able to use the AGL250 and above.