summaryrefslogtreecommitdiffstats
path: root/test_rrobin_problem/rtl
diff options
context:
space:
mode:
authorBert Lange <b.lange@hzdr.de>2012-01-09 14:22:17 +0100
committerBert Lange <b.lange@hzdr.de>2012-01-09 14:22:17 +0100
commitce5571bf19ac87000fc3f7a5bf7a416083a99925 (patch)
tree89aadcbc8d8a8f27cc26334581f583dc04280a09 /test_rrobin_problem/rtl
parent416d5f8f216f97ea0ecf7224e9f02ef324f312cc (diff)
downloadzpu-ce5571bf19ac87000fc3f7a5bf7a416083a99925.zip
zpu-ce5571bf19ac87000fc3f7a5bf7a416083a99925.tar.gz
rename directorys
Diffstat (limited to 'test_rrobin_problem/rtl')
-rw-r--r--test_rrobin_problem/rtl/box.vhd167
-rw-r--r--test_rrobin_problem/rtl/top.vhd67
2 files changed, 36 insertions, 198 deletions
diff --git a/test_rrobin_problem/rtl/box.vhd b/test_rrobin_problem/rtl/box.vhd
index ca0e5f5..59d703b 100644
--- a/test_rrobin_problem/rtl/box.vhd
+++ b/test_rrobin_problem/rtl/box.vhd
@@ -7,20 +7,14 @@
library ieee;
use ieee.std_logic_1164.all;
-use ieee.std_logic_misc.or_reduce; -- by synopsis
use ieee.numeric_std.all;
library gaisler;
use gaisler.misc.all; -- types
use gaisler.uart.all; -- types
use gaisler.net.all; -- types
-use gaisler.memctrl.all; -- spimctrl types
use gaisler.uart.apbuart;
-use gaisler.misc.ahbdpram;
-use gaisler.misc.gptimer;
use gaisler.misc.grgpio;
-use gaisler.misc.apbvga;
-use gaisler.memoryctrl.mctrl; -- original in esa lib
library grlib;
use grlib.amba.all;
@@ -28,10 +22,6 @@ use grlib.amba.all;
library techmap;
use techmap.gencomp.all; -- constants
-library work;
---use work.types.all;
---use board_sp601.components.chipscope;
-
entity box is
generic (
@@ -45,27 +35,11 @@ entity box is
uarto : out uart_out_type;
--
gpioi : in gpio_in_type;
- gpioo : out gpio_out_type;
- --
- fmc_i2ci : in i2c_in_type;
- fmc_i2co : out i2c_out_type;
- --
- spmi : in spimctrl_in_type;
- spmo : out spimctrl_out_type;
- --
- memi : in memory_in_type;
- memo : out memory_out_type
+ gpioo : out gpio_out_type
);
end entity box;
-library gaisler;
-use gaisler.misc.all; -- types
-use gaisler.uart.all; -- types
-use gaisler.net.all; -- types
-use gaisler.memctrl.all; -- spimctrl types + spmictrl component
-
-
architecture rtl of box is
signal box_reset : std_ulogic;
@@ -78,14 +52,7 @@ architecture rtl of box is
signal apbctrl_i0_apbi : apb_slv_in_type;
signal apbo : apb_slv_out_vector := (others => apb_none);
--
- signal gpti : gptimer_in_type;
- signal gptimer_i0_gpto : gptimer_out_type;
- --
signal grgpio_i0_gpioo : gpio_out_type;
- --
- signal i2cmst_i0_i2co : i2c_out_type;
- signal i2cmst_i1_i2co : i2c_out_type;
- signal box_mctrl_wpo : wprot_out_type := (wprothit => '0');
begin
@@ -153,8 +120,8 @@ begin
ahbso(1) <= (ahbs_none);
ahbso(2) <= (ahbs_none);
ahbso(3) <= (ahbs_none);
- --ahbso(4) <= (ahbs_none); -- spimctrl
- --ahbso(5) <= (ahbs_none); -- mctrl
+ ahbso(4) <= (ahbs_none); -- spimctrl
+ ahbso(5) <= (ahbs_none); -- mctrl
ahbso(6) <= (ahbs_none);
ahbso(7) <= (ahbs_none);
@@ -187,68 +154,6 @@ begin
----------------------------------------------------------------------
- ---------------------------------------------------------------------
- -- AHB SPI memory controller
- -- for SPI X4 (Winbond W25Q64VSFIG) 64-Mbit flash memory
- spimctrl_i0 : spimctrl
- generic map (
- hindex => 4, -- : integer := 0; -- AHB slave index
- faddr => 16#E00#, -- : integer := 16#000#; -- Flash map base address
- fmask => 16#FF8#, -- : integer := 16#fff#; -- Flash area mask
- ioaddr => 16#002#, -- : integer := 16#000#; -- I/O base address
- iomask => 16#fff#, -- : integer := 16#fff#; -- I/O mask
- readcmd => 16#3b#, -- : integer range 0 to 255 := 16#0B#; -- Mem. dev. READ command
- dummybyte => 1, -- : integer range 0 to 1 := 1; -- Dummy byte after cmd
- dualoutput => 1 -- : integer range 0 to 1 := 0; -- Enable dual output
- )
- port map (
- rstn => box_reset_n, -- : in std_ulogic;
- clk => clk, -- : in std_ulogic;
- ahbsi => ahbctrl_i0_slvi, -- : in ahb_slv_in_type;
- ahbso => ahbso(4), -- : out ahb_slv_out_type;
- spii => spmi, -- : in spimctrl_in_type;
- spio => spmo -- : out spimctrl_out_type
- );
- ---------------------------------------------------------------------
-
-
-
- ---------------------------------------------------------------------
- -- AHB BPI memory controller
- mctrl_i0 : mctrl
- generic map (
- hindex => 5, -- : integer := 0;
- pindex => 15, -- : integer := 0;
- romaddr => 16#B00#, -- : integer := 16#000#;
- rommask => 16#FF0#, -- : integer := 16#E00#;
- ioaddr => 16#C00#, -- : integer := 16#000#;
- iomask => 16#FFF#,
- ramaddr => 16#D00#, -- : integer := 16#000#;
- rammask => 16#FFF#,
- paddr => 15, -- : integer := 0;
- pmask => 16#FFF#, -- : integer := 16#fff#;
- romasel => 25, -- : integer := 28;
- ram8 => 1, -- : integer := 0;
- ram16 => 0, -- : integer := 0;
- syncrst => 1, -- : integer := 0;
- pageburst => 0, -- : integer := 0;
- scantest => 0 -- : integer := 0;
- )
- port map (
- rst => box_reset_n, -- : in std_ulogic;
- clk => clk, -- : in std_ulogic;
- memi => memi, -- : in memory_in_type;
- memo => memo, -- : out memory_out_type;
- ahbsi => ahbctrl_i0_slvi, -- : in ahb_slv_in_type;
- ahbso => ahbso(5), -- : out ahb_slv_out_type;
- apbi => apbctrl_i0_apbi, -- : in apb_slv_in_type;
- apbo => apbo(15), -- : out apb_slv_out_type;
- wpo => box_mctrl_wpo, -- : in wprot_out_type; -- unused
- sdo => open -- : out sdram_out_type
- );
- ---------------------------------------------------------------------
-
-
---------------------------------------------------------------------
@@ -256,20 +161,20 @@ begin
apbo( 0) <= (apb_none);
--apbo( 1) <= (apb_none); -- apbuart_i0
- --apbo( 2) <= (apb_none); -- gptimer_i0
+ apbo( 2) <= (apb_none); -- gptimer_i0
apbo( 3) <= (apb_none);
--apbo( 4) <= (apb_none); -- grgpio_i0
- apbo( 5) <= (apb_none);
+ --apbo( 5) <= (apb_none);
apbo( 6) <= (apb_none); -- no apbvga_i0
apbo( 7) <= (apb_none); -- no i2cmst_i0
apbo( 8) <= (apb_none);
apbo( 9) <= (apb_none);
- --apbo(10) <= (apb_none); -- i2cmst_i1
+ apbo(10) <= (apb_none); -- i2cmst_i1
apbo(11) <= (apb_none);
apbo(12) <= (apb_none);
apbo(13) <= (apb_none);
apbo(14) <= (apb_none);
- --apbo(15) <= (apb_none); -- mctrl_i0
+ apbo(15) <= (apb_none); -- mctrl_i0
apbctrl_i0: apbctrl
generic map (
@@ -311,33 +216,6 @@ begin
);
---------------------------------------------------------------------
-
- ---------------------------------------------------------------------
- -- GP timer (grip.pdf p. 279)
-
- gpti.extclk <= '0'; -- alternativ timer clock
- gpti.dhalt <= '0'; -- debug halt
-
- gptimer_i0: gptimer
- generic map (
- pindex => 2,
- paddr => 2,
- pirq => 3,
- sepirq => 0, -- use separate interupts for each timer
- sbits => 8, -- prescaler bits
- ntimers => 2, -- number of timers
- nbits => 20 -- timer bits
- )
- port map (
- rst => box_reset_n,
- clk => clk,
- apbi => apbctrl_i0_apbi,
- apbo => apbo(2),
- gpti => gpti,
- gpto => gptimer_i0_gpto
- );
- ---------------------------------------------------------------------
-
---------------------------------------------------------------------
-- GPIO
@@ -368,25 +246,20 @@ begin
---------------------------------------------------------------------
- ---------------------------------------------------------------------
- -- I2C for FMC connector
- i2cmst_i1: i2cmst
+ freqctr_i0: entity work.freqctr
generic map (
- pindex => 10,
- paddr => 10,
- pmask => 16#FFF#,
- pirq => 15 -- TODO: check this
- )
- port map (
- rstn => box_reset_n,
- clk => clk,
- apbi => apbctrl_i0_apbi,
- apbo => apbo(10),
- i2ci => fmc_i2ci, --: in i2c_in_type;
- i2co => i2cmst_i1_i2co --: out i2c_out_type;
+ pindex => 5, -- : integer := 0;
+ paddr => 5 -- : integer := 0;
+-- pmask => -- : integer := 16#fff#;
+-- nbits => -- : integer range 1 to 32 := 16
+ )
+ port map (
+ rst => box_reset_n, -- : in std_ulogic;
+ clk => clk, -- : in std_ulogic;
+ apbi => apbctrl_i0_apbi, -- : in apb_slv_in_type;
+ apbo => apbo(5), -- : out apb_slv_out_type;
+ tick => '0', -- : in std_logic;
+ sig => '0' -- : in std_logic
);
- fmc_i2co <= i2cmst_i1_i2co;
- ---------------------------------------------------------------------
-
end architecture rtl;
diff --git a/test_rrobin_problem/rtl/top.vhd b/test_rrobin_problem/rtl/top.vhd
index 275a9c2..b6174c3 100644
--- a/test_rrobin_problem/rtl/top.vhd
+++ b/test_rrobin_problem/rtl/top.vhd
@@ -225,8 +225,6 @@ end entity top;
library gaisler;
use gaisler.misc.all; -- types
use gaisler.uart.all; -- types
-use gaisler.net.all; -- types
-use gaisler.memctrl.all; -- spimctrl types
architecture rtl of top is
@@ -255,15 +253,9 @@ architecture rtl of top is
--
signal uarti : uart_in_type;
signal gpioi : gpio_in_type;
- signal fmc_i2ci : i2c_in_type;
- signal spmi : spimctrl_in_type;
- signal memi : memory_in_type;
--
signal box_i0_uarto : uart_out_type;
signal box_i0_gpioo : gpio_out_type;
- signal box_i0_fmc_i2co : i2c_out_type;
- signal box_i0_spmo : spimctrl_out_type;
- signal box_i0_memo : memory_out_type;
begin
@@ -454,44 +446,28 @@ begin
------------------------------------------------------------
-- SPI memory pads
-- SPI X4 (Winbond W25Q64VSFIG) 64-Mbit flash memory
- -- in
- spmi.miso <= fpga_d0_din_miso_miso1; -- shared with flash data
- spmi.mosi <= fpga_mosi_csi_b_miso0; -- bidi for 2x mode
- spmi.cd <= '0'; -- card detection
- -- out
- fpga_d2_miso3 <= '1' when box_i0_spmo.csn = '0' else 'Z'; -- /hold
- fpga_d1_miso2 <= '0' when box_i0_spmo.csn = '0' else 'Z'; -- /write_protect
- fpga_cclk <= box_i0_spmo.sck;
- fpga_mosi_csi_b_miso0 <= box_i0_spmo.mosi when box_i0_spmo.mosioen = '0' else 'Z';
- spi_cs_b <= '0' when box_i0_spmo.csn = '0' else 'Z';
+ fpga_d2_miso3 <= 'Z'; -- /hold
+ fpga_d1_miso2 <= 'Z'; -- /write_protect
+ fpga_cclk <= '0';
+ fpga_mosi_csi_b_miso0 <= 'Z';
+ spi_cs_b <= 'Z';
------------------------------------------------------------
-- BPI parallel flash
- -- in
- memi.brdyn <= '1'; -- bus ready strobe
- memi.bexcn <= '1'; -- bus exception
- memi.wrn(3 downto 0) <= "1111"; -- sram write enable feedback
- memi.bwidth(1 downto 0) <= "00"; -- data width of prom area = 8 bit
- memi.sd <= (others => '1'); -- sdram separate data bus
- memi.data <= flash_d & fpga_d2_miso3 & fpga_d1_miso2 & fpga_d0_din_miso_miso1 & x"000000";
- memi.cb <= (others => '1');
- memi.scb <= (others => '1');
- memi.writen <= '1';
- memi.edac <= '1';
-- inout
- fpga_d0_din_miso_miso1 <= box_i0_memo.data(24) when box_i0_memo.bdrive(0) = '0' else 'Z';
- fpga_d1_miso2 <= box_i0_memo.data(25) when box_i0_memo.bdrive(0) = '0' else 'Z';
- fpga_d2_miso3 <= box_i0_memo.data(26) when box_i0_memo.bdrive(0) = '0' else 'Z';
- flash_d(7 downto 3) <= box_i0_memo.data(31 downto 27) when box_i0_memo.bdrive(0) = '0' else "ZZZZZ";
+ fpga_d0_din_miso_miso1 <= 'Z';
+ fpga_d1_miso2 <= 'Z';
+ fpga_d2_miso3 <= 'Z';
+ flash_d(7 downto 3) <= "ZZZZZ";
-- out
fmc_pwr_good_flash_rst_b <= reset_n;
- flash_ce_b <= box_i0_memo.romsn(0);
- flash_oe_b <= box_i0_memo.oen;
- flash_we_b <= box_i0_memo.writen;
+ flash_ce_b <= '1';
+ flash_oe_b <= '1';
+ flash_we_b <= '1';
- flash_a <= box_i0_memo.address(24 downto 0);
+ flash_a <= (others => 'Z');
@@ -526,16 +502,7 @@ begin
uarto => box_i0_uarto, --: out uart_out_type;
--
gpioi => gpioi, --: in gpio_in_type;
- gpioo => box_i0_gpioo, --: out gpio_out_type;
- --
- fmc_i2ci => fmc_i2ci, --: in i2c_in_type;
- fmc_i2co => box_i0_fmc_i2co, --: out i2c_out_type;
- --
- spmi => spmi, --: in spmictrl_in_type;
- spmo => box_i0_spmo, --: out spmictrl_out_type;
- --
- memi => memi, --: in memory_in_type;
- memo => box_i0_memo --: out memory_out_type;
+ gpioo => box_i0_gpioo --: out gpio_out_type;
);
------------------------------------------------------------
@@ -554,10 +521,8 @@ begin
------------------------------------------------------------
-- fmc/main i2c io pads
- fmc_i2ci.scl <= iic_scl_main;
- iic_scl_main <= box_i0_fmc_i2co.scl when box_i0_fmc_i2co.scloen = '0' else 'Z';
+ iic_scl_main <= 'Z';
- fmc_i2ci.sda <= iic_sda_main;
- iic_sda_main <= box_i0_fmc_i2co.sda when box_i0_fmc_i2co.sdaoen = '0' else 'Z';
+ iic_sda_main <= 'Z';
end architecture rtl;
OpenPOWER on IntegriCloud