LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cores > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Guy Hutchison<ghutchis@g...>
    Date: Tue May 6 17:42:23 CEST 2008
    Subject: [oc] T80 Core x
    Top
    The assembly looks reasonable, although it looks like you're using a
    different assembler than the SDCC one. As I recall, the Z80 assembler
    requires a # in front of every numeric constant.

    Basic question: Have you simulated this in VHDL? Does it pass in simulation?

    When you synthesize the design to the different FPGA targets, does it
    meet timing in each target? Have you tried to simulate the gate level
    netlists coming out of the synthesis tool?

    On Mon, May 5, 2008 at 6:27 AM, <ronivon.costa@g...> wrote:
    > I would appreciate any help from people who used the T80 core on this.
    > This is more a multi-discipline problem, because it relates to Z80
    > assembly and VHDL:
    >
    > I have this logic to read/write into memory.
    >
    > DI_CPU is the Z80 input data bus.
    > DO_CPU is the Z80 output data bus.
    > A is the Z80 address bus.
    >
    > The others signals are for video ram (block memory) and other devices.
    >
    > This process is to store data on memory:
    >
    > writevram: process(Clk_Z80)
    > begin
    > if Clk_Z80'event and Clk_Z80 = '1' then
    > if A >= x"2000" and A <= x"27FF" then
    > vram_addra_sig <= A - x"2000";
    > if Wr_n = '0' and MReq_n = '0' then
    > vram_dina_sig <= DO_CPU;
    > vram_wea_sig <= '0';
    > else
    > vram_wea_sig <= '1';
    > end if;
    > else
    > vram_wea_sig <= '1';
    > end if;
    > end if;
    > end process;
    >
    >
    > And this continuous assignment is to read memory and input from other
    > devices and send to the Z80:
    >
    > DI_CPU <= D_ROM when (Rd_n = '0' and MReq_n = '0' and A < x"2000") else
    > ("0000" & SW) when (IORQ_n = '0' and Rd_n = '0' and A(7 downto 0) =
    > x"20") else
    > ("0000" & KEY) when (IORQ_n = '0' and Rd_n = '0' and A(7 downto 0)
    > = x"30") else
    > ps2_ascii_reg when (IORQ_n = '0' and Rd_n = '0' and A(7 downto 0) =
    > x"80");
    >
    >
    > Now the program in Z80 assembly.
    > This next small program will run without problems, and the byte will
    > be stored in memory. I can have a buch of such commands,in sequence,
    > and they will run and the data will be stored in memory.
    >
    > ld a,41h ; define data to store
    > ld (8250),a ; store the data in memory position 8250 decimal
    > ld a,42h
    > ld (8251),a
    >
    > However, if I try to write a block of data, it will fail, and the data
    > will not be written into memory:
    >
    > ld de,texto ; data to store in memory
    > ld bc,2000h ; address of memory to store the data
    > loop1:
    > ld a,(de) ; read 1 character
    > or a ; compares with zero
    > jr z,next1 ; if zero, then end of text
    > ld (bc),a ; store character in ram
    > inc bc ; point to next ram position
    > inc de ; point to next character
    > jr loop1 ; go to store next character
    > texto:
    > db "Testing T80 Core "
    > db 0
    >
    > --
    >
    > So, what do you think it is happening?
    > I have considered a T80 bug, but have not come to a definitive test to
    > prove that.
    >
    > In the other hand, I really think there is a problem with my logic. I
    > am a beginner with VHDL and FPGAs.
    >
    > The memory model were generated using coregenerator (xilinx) and
    > implemented in a Spartan 3E.
    > The problem does not occur when I use quartus and implement the design
    > on a DE1 board.
    >
    > Any thoughts? Ideia? I really appreciate.
    > Thanks.
    > _______________________________________________
    > http://www.opencores.org/mailman/listinfo/cores
    >

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.