1 |
34 |
wfjm |
-- $Id: pdp11_dmhbpt.vhd 702 2015-07-19 17:36:09Z mueller $
|
2 |
|
|
--
|
3 |
|
|
-- Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
4 |
|
|
--
|
5 |
|
|
-- This program is free software; you may redistribute and/or modify it under
|
6 |
|
|
-- the terms of the GNU General Public License as published by the Free
|
7 |
|
|
-- Software Foundation, either version 2, or at your option any later version.
|
8 |
|
|
--
|
9 |
|
|
-- This program is distributed in the hope that it will be useful, but
|
10 |
|
|
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
|
11 |
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
12 |
|
|
-- for complete details.
|
13 |
|
|
--
|
14 |
|
|
------------------------------------------------------------------------------
|
15 |
|
|
-- Module Name: pdp11_dmhbpt - syn
|
16 |
|
|
-- Description: pdp11: debug&moni: hardware breakpoint
|
17 |
|
|
--
|
18 |
|
|
-- Dependencies: pdp11_dmhbpt_unit
|
19 |
|
|
-- rbus/rb_sres_or_4
|
20 |
|
|
-- Test bench: -
|
21 |
|
|
--
|
22 |
|
|
-- Target Devices: generic
|
23 |
|
|
-- Tool versions: ise 14.7; viv 2014.4; ghdl 0.31
|
24 |
|
|
--
|
25 |
|
|
-- Synthesized (xst):
|
26 |
|
|
-- Date Rev ise Target flop lutl lutm slic t peri
|
27 |
|
|
-- 2015-07-12 700 14.7 131013 xc6slx16-2 78 133 0 42 s 3.8 (N=2)
|
28 |
|
|
--
|
29 |
|
|
-- Revision History: -
|
30 |
|
|
-- Date Rev Version Comment
|
31 |
|
|
-- 2015-07-19 702 1.0 Initial version
|
32 |
|
|
-- 2015-07-05 698 0.1 First draft
|
33 |
|
|
------------------------------------------------------------------------------
|
34 |
|
|
|
35 |
|
|
library ieee;
|
36 |
|
|
use ieee.std_logic_1164.all;
|
37 |
|
|
use ieee.numeric_std.all;
|
38 |
|
|
|
39 |
|
|
use work.slvtypes.all;
|
40 |
|
|
use work.rblib.all;
|
41 |
|
|
use work.pdp11.all;
|
42 |
|
|
|
43 |
|
|
-- ----------------------------------------------------------------------------
|
44 |
|
|
|
45 |
|
|
entity pdp11_dmhbpt is -- debug&moni: hardware breakpoint
|
46 |
|
|
generic (
|
47 |
|
|
RB_ADDR : slv16 := slv(to_unsigned(16#0050#,16));
|
48 |
|
|
NUNIT : natural := 2);
|
49 |
|
|
port (
|
50 |
|
|
CLK : in slbit; -- clock
|
51 |
|
|
RESET : in slbit; -- reset
|
52 |
|
|
RB_MREQ : in rb_mreq_type; -- rbus: request
|
53 |
|
|
RB_SRES : out rb_sres_type; -- rbus: response
|
54 |
|
|
DM_STAT_SE : in dm_stat_se_type; -- debug and monitor status - sequencer
|
55 |
|
|
DM_STAT_DP : in dm_stat_dp_type; -- debug and monitor status - data path
|
56 |
|
|
DM_STAT_VM : in dm_stat_vm_type; -- debug and monitor status - vmbox
|
57 |
|
|
DM_STAT_CO : in dm_stat_co_type; -- debug and monitor status - core
|
58 |
|
|
HBPT : out slbit -- hw break flag
|
59 |
|
|
);
|
60 |
|
|
end pdp11_dmhbpt;
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
architecture syn of pdp11_dmhbpt is
|
64 |
|
|
|
65 |
|
|
type sres_array_type is array (3 downto 0) of rb_sres_type;
|
66 |
|
|
signal SRES_ARRAY : sres_array_type:= (others=>rb_sres_init);
|
67 |
|
|
signal HBPT_SUM : slv(NUNIT-1 downto 0) := (others=>'0');
|
68 |
|
|
constant hbptzero : slv(HBPT_SUM'range) := (others=>'0');
|
69 |
|
|
|
70 |
|
|
begin
|
71 |
|
|
|
72 |
|
|
assert NUNIT>=1 and NUNIT<=4
|
73 |
|
|
report "assert(NUNIT>=1 and NUNIT<=4): unsupported NUNIT"
|
74 |
|
|
severity failure;
|
75 |
|
|
|
76 |
|
|
GU: for i in NUNIT-1 downto 0 generate
|
77 |
|
|
HBPT : pdp11_dmhbpt_unit
|
78 |
|
|
generic map (
|
79 |
|
|
RB_ADDR => RB_ADDR,
|
80 |
|
|
INDEX => i)
|
81 |
|
|
port map (
|
82 |
|
|
CLK => CLK,
|
83 |
|
|
RESET => RESET,
|
84 |
|
|
RB_MREQ => RB_MREQ,
|
85 |
|
|
RB_SRES => SRES_ARRAY(i),
|
86 |
|
|
DM_STAT_SE => DM_STAT_SE,
|
87 |
|
|
DM_STAT_DP => DM_STAT_DP,
|
88 |
|
|
DM_STAT_VM => DM_STAT_VM,
|
89 |
|
|
DM_STAT_CO => DM_STAT_CO,
|
90 |
|
|
HBPT => HBPT_SUM(i)
|
91 |
|
|
);
|
92 |
|
|
end generate GU;
|
93 |
|
|
|
94 |
|
|
GD: for i in 3 downto NUNIT generate
|
95 |
|
|
SRES_ARRAY(i) <= rb_sres_init;
|
96 |
|
|
end generate GD;
|
97 |
|
|
|
98 |
|
|
RB_SRES_OR : rb_sres_or_4
|
99 |
|
|
port map (
|
100 |
|
|
RB_SRES_1 => SRES_ARRAY(0),
|
101 |
|
|
RB_SRES_2 => SRES_ARRAY(1),
|
102 |
|
|
RB_SRES_3 => SRES_ARRAY(2),
|
103 |
|
|
RB_SRES_4 => SRES_ARRAY(3),
|
104 |
|
|
RB_SRES_OR => RB_SRES
|
105 |
|
|
);
|
106 |
|
|
|
107 |
|
|
HBPT <= '1' when HBPT_SUM /= hbptzero else '0';
|
108 |
|
|
|
109 |
|
|
end syn;
|