OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [rtl/] [w11a/] [tb/] [tb_pdp11core.vhd] - Diff between revs 28 and 30

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 28 Rev 30
Line 1... Line 1...
-- $Id: tb_pdp11core.vhd 621 2014-12-26 21:20:05Z mueller $
-- $Id: tb_pdp11core.vhd 675 2015-05-08 21:05:08Z mueller $
--
--
-- Copyright 2006-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
-- Copyright 2006-2015 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
--
--
-- This program is free software; you may redistribute and/or modify it under
-- This program is free software; you may redistribute and/or modify it under
-- the terms of the GNU General Public License as published by the Free
-- the terms of the GNU General Public License as published by the Free
-- Software Foundation, either version 2, or at your option any later version.
-- Software Foundation, either version 2, or at your option any later version.
--
--
Line 45... Line 45...
-- 2007-10-07    88  _ssim 0.26  8.1    I24   xc3s1000   c:fail -> blog_webpack
-- 2007-10-07    88  _ssim 0.26  8.1    I24   xc3s1000   c:fail -> blog_webpack
-- 2007-10-07    88  -     0.26  -            -          c:ok
-- 2007-10-07    88  -     0.26  -            -          c:ok
--
--
-- Revision History: 
-- Revision History: 
-- Date         Rev Version  Comment
-- Date         Rev Version  Comment
 
-- 2015-05-08   675   1.5    start/stop/suspend overhaul
-- 2014-12-26   621   1.4.1  adopt wmembe,ribr,wibr emulation to new 4k window
-- 2014-12-26   621   1.4.1  adopt wmembe,ribr,wibr emulation to new 4k window
-- 2011-12-23   444   1.4    use new simclk/simclkcnt
-- 2011-12-23   444   1.4    use new simclk/simclkcnt
-- 2011-11-18   427   1.3.2  now numeric_std clean
-- 2011-11-18   427   1.3.2  now numeric_std clean
-- 2011-01-02   352   1.3.1  rename .cpmon->.rlmon
-- 2011-01-02   352   1.3.1  rename .cpmon->.rlmon
-- 2010-12-30   351   1.3    rename tb_pdp11_core -> tb_pdp11core
-- 2010-12-30   351   1.3    rename tb_pdp11_core -> tb_pdp11core
Line 112... Line 113...
  signal CP_STAT_cmdack : slbit := '0';
  signal CP_STAT_cmdack : slbit := '0';
  signal CP_STAT_cmderr : slbit := '0';
  signal CP_STAT_cmderr : slbit := '0';
  signal CP_STAT_cmdmerr : slbit := '0';
  signal CP_STAT_cmdmerr : slbit := '0';
  signal CP_STAT_cpugo : slbit := '0';
  signal CP_STAT_cpugo : slbit := '0';
  signal CP_STAT_cpustep : slbit := '0';
  signal CP_STAT_cpustep : slbit := '0';
  signal CP_STAT_cpuhalt : slbit := '0';
  signal CP_STAT_cpuwait : slbit := '0';
 
  signal CP_STAT_cpususp : slbit := '0';
  signal CP_STAT_cpurust : slv4 := (others=>'0');
  signal CP_STAT_cpurust : slv4 := (others=>'0');
 
  signal CP_STAT_suspint : slbit := '0';
 
  signal CP_STAT_suspext : slbit := '0';
  signal CP_DOUT : slv16 := (others=>'0');
  signal CP_DOUT : slv16 := (others=>'0');
 
 
  signal CLK_STOP : slbit := '0';
  signal CLK_STOP : slbit := '0';
  signal CLK_CYCLE : integer := 0;
  signal CLK_CYCLE : integer := 0;
 
 
Line 162... Line 166...
      CP_STAT_cmdack  => CP_STAT_cmdack,
      CP_STAT_cmdack  => CP_STAT_cmdack,
      CP_STAT_cmderr  => CP_STAT_cmderr,
      CP_STAT_cmderr  => CP_STAT_cmderr,
      CP_STAT_cmdmerr => CP_STAT_cmdmerr,
      CP_STAT_cmdmerr => CP_STAT_cmdmerr,
      CP_STAT_cpugo   => CP_STAT_cpugo,
      CP_STAT_cpugo   => CP_STAT_cpugo,
      CP_STAT_cpustep => CP_STAT_cpustep,
      CP_STAT_cpustep => CP_STAT_cpustep,
      CP_STAT_cpuhalt => CP_STAT_cpuhalt,
      CP_STAT_cpuwait => CP_STAT_cpuwait,
 
      CP_STAT_cpususp => CP_STAT_cpususp,
      CP_STAT_cpurust => CP_STAT_cpurust,
      CP_STAT_cpurust => CP_STAT_cpurust,
 
      CP_STAT_suspint => CP_STAT_suspint,
 
      CP_STAT_suspext => CP_STAT_suspext,
      CP_DOUT         => CP_DOUT
      CP_DOUT         => CP_DOUT
    );
    );
 
 
  proc_stim: process
  proc_stim: process
    file ifile : text open read_mode is "tb_pdp11core_stim";
    file ifile : text open read_mode is "tb_pdp11core_stim";
Line 325... Line 332...
              else
              else
                SB_CNTL(ibit) <= 'L';
                SB_CNTL(ibit) <= 'L';
              end if;
              end if;
 
 
            when others =>              -- bad directive
            when others =>              -- bad directive
              write(oline, string'("?? unknown directive: "));
              write(oline, string'("-E: unknown directive: "));
              write(oline, dname);
              write(oline, dname);
              writeline(output, oline);
              writeline(output, oline);
              report "aborting" severity failure;
              report "aborting" severity failure;
          end case;
          end case;
 
 
Line 436... Line 443...
              irnum := c_gpr_pc;
              irnum := c_gpr_pc;
              readoct_ea(iline, idin);
              readoct_ea(iline, idin);
              idosta := '1';              -- request 'sta' to be done next
              idosta := '1';              -- request 'sta' to be done next
 
 
            when "sta   " =>            -- sta
            when "sta   " =>            -- sta
              ifunc := c_cpfunc_sta;
              ifunc := c_cpfunc_start;
            when "sto   " =>            -- sto
            when "sto   " =>            -- sto
              ifunc := c_cpfunc_sto;
              ifunc := c_cpfunc_stop;
            when "cont  " =>            -- cont
 
              ifunc := c_cpfunc_cont;
 
            when "step  " =>            -- step
            when "step  " =>            -- step
              ifunc := c_cpfunc_step;
              ifunc := c_cpfunc_step;
              iwtstp := true;
              iwtstp := true;
            when "rst   " =>            -- rst
            when "cres  " =>            -- cres
              ifunc := c_cpfunc_rst;
              ifunc := c_cpfunc_creset;
 
            when "bres  " =>            -- bres
 
              ifunc := c_cpfunc_breset;
 
            when "susp  " =>            -- susp
 
              ifunc := c_cpfunc_suspend;
 
            when "resu  " =>            -- resu
 
              ifunc := c_cpfunc_resume;
 
 
            when "wtgo  " =>            -- wtgo
            when "wtgo  " =>            -- wtgo
              iwtgo := true;
              iwtgo := true;
              ireq  := false;             -- no cp request !
              ireq  := false;             -- no cp request !
 
 
            when "wtlam " =>            -- wtlam (ignore it)
            when "wtlam " =>            -- wtlam (ignore it)
              readempty(iline);
              readempty(iline);
              next file_loop;
              next file_loop;
 
 
            when others =>              -- bad directive
            when others =>              -- bad directive
              write(oline, string'("?? unknown directive: "));
              write(oline, string'("-E: unknown directive: "));
              write(oline, dname);
              write(oline, dname);
              writeline(output, oline);
              writeline(output, oline);
              report "aborting" severity failure;
              report "aborting" severity failure;
          end case;
          end case;
 
 
Line 551... Line 562...
            if idoibr then
            if idoibr then
              write(oline, string'("wibr"));
              write(oline, string'("wibr"));
            else
            else
              write(oline, string'("wmem"));
              write(oline, string'("wmem"));
            end if;
            end if;
          when c_cpfunc_sta  => write(oline, string'("sta "));
          when c_cpfunc_start   => write(oline, string'("sta "));
          when c_cpfunc_sto  => write(oline, string'("sto "));
          when c_cpfunc_stop    => write(oline, string'("sto "));
          when c_cpfunc_cont => write(oline, string'("cont"));
 
          when c_cpfunc_step => write(oline, string'("step"));
          when c_cpfunc_step => write(oline, string'("step"));
          when c_cpfunc_rst  => write(oline, string'("rst "));
          when c_cpfunc_creset  => write(oline, string'("cres"));
 
          when c_cpfunc_breset  => write(oline, string'("bres"));
 
          when c_cpfunc_suspend => write(oline, string'("susp"));
 
          when c_cpfunc_resume  => write(oline, string'("resu"));
          when others =>
          when others =>
            write(oline, string'("?"));
            write(oline, string'("?"));
            writeoct(oline, ifunc, right, 2);
            writeoct(oline, ifunc, right, 2);
            write(oline, string'("?"));
            write(oline, string'("?"));
        end case;
        end case;
Line 573... Line 586...
      write(oline, R_CP_STAT.cmdack, right, 2);
      write(oline, R_CP_STAT.cmdack, right, 2);
      write(oline, R_CP_STAT.cmderr, right, 2);
      write(oline, R_CP_STAT.cmderr, right, 2);
      write(oline, R_CP_STAT.cmdmerr, right, 2);
      write(oline, R_CP_STAT.cmdmerr, right, 2);
      writeoct(oline, R_CP_DOUT, right, 8);
      writeoct(oline, R_CP_DOUT, right, 8);
      write(oline, R_CP_STAT.cpugo, right, 3);
      write(oline, R_CP_STAT.cpugo, right, 3);
      write(oline, R_CP_STAT.cpustep, right, 2);
      write(oline, R_CP_STAT.cpustep, right, 1);
      write(oline, R_CP_STAT.cpuhalt, right, 2);
      write(oline, R_CP_STAT.cpuwait, right, 1);
 
      write(oline, R_CP_STAT.cpususp, right, 1);
 
      write(oline, R_CP_STAT.suspint, right, 1);
 
      write(oline, R_CP_STAT.suspext, right, 1);
      writeoct(oline, R_CP_STAT.cpurust, right, 3);
      writeoct(oline, R_CP_STAT.cpurust, right, 3);
 
 
      if R_WAITOK = '1' then
      if R_WAITOK = '1' then
        if R_CP_STAT.cmderr='1' or icerr=1 then
        if R_CP_STAT.cmderr='1' or icerr=1 then
          if    R_CP_STAT.cmderr='1' and icerr=0 then
          if    R_CP_STAT.cmderr='1' and icerr=0 then
Line 665... Line 681...
      R_CP_STAT.cmdack  <= CP_STAT_cmdack;
      R_CP_STAT.cmdack  <= CP_STAT_cmdack;
      R_CP_STAT.cmderr  <= CP_STAT_cmderr;
      R_CP_STAT.cmderr  <= CP_STAT_cmderr;
      R_CP_STAT.cmdmerr <= CP_STAT_cmdmerr;
      R_CP_STAT.cmdmerr <= CP_STAT_cmdmerr;
      R_CP_STAT.cpugo   <= CP_STAT_cpugo;
      R_CP_STAT.cpugo   <= CP_STAT_cpugo;
      R_CP_STAT.cpustep <= CP_STAT_cpustep;
      R_CP_STAT.cpustep <= CP_STAT_cpustep;
      R_CP_STAT.cpuhalt <= CP_STAT_cpuhalt;
      R_CP_STAT.cpuwait <= CP_STAT_cpuwait;
 
      R_CP_STAT.cpususp <= CP_STAT_cpususp;
      R_CP_STAT.cpurust <= CP_STAT_cpurust;
      R_CP_STAT.cpurust <= CP_STAT_cpurust;
 
      R_CP_STAT.suspint <= CP_STAT_suspint;
 
      R_CP_STAT.suspext <= CP_STAT_suspext;
      R_CP_DOUT <= CP_DOUT;
      R_CP_DOUT <= CP_DOUT;
 
 
    end loop;
    end loop;
 
 
  end process proc_moni;
  end process proc_moni;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.