demo: ring oscillator test design

parent 1f2b97d5
TDC_DIR=../../../..
SRC=rotest.vhd $(TDC_DIR)/core/tdc_package.vhd $(TDC_DIR)/core/tdc_ringosc.vhd
all: build/rotest.bit
build/rotest.prj: $(SRC)
rm -f build/rotest.prj
for i in `echo $(SRC)`; do \
echo "vhdl work ../$$i" >> build/rotest.prj; \
done
build/rotest.ngc: build/rotest.prj
cd build && xst -ifn ../rotest.xst
build/rotest.ngd: build/rotest.ngc rotest.ucf
cd build && ngdbuild -uc ../rotest.ucf rotest.ngc
build/rotest.ncd: build/rotest.ngd
cd build && map -ol high -w rotest.ngd
build/rotest-routed.ncd: build/rotest.ncd
cd build && par -ol high -w rotest.ncd rotest-routed.ncd
build/rotest.bit: build/rotest-routed.ncd
cd build && bitgen -w rotest-routed.ncd rotest.bit
build/rotest-routed.twr: build/rotest-routed.ncd
cd build && trce -v 10 rotest-routed.ncd rotest.pcf
clean:
rm -rf build/*
.PHONY: timing clean
NET "en" LOC = C22 | IOSTANDARD = "LVCMOS18";
NET "led" LOC = G19 | IOSTANDARD = "LVCMOS18";
NET "out_p" LOC = W17 | IOSTANDARD = "LVDS_25";
NET "out_n" LOC = Y18 | IOSTANDARD = "LVDS_25";
NET "oe_n" LOC = V17 | IOSTANDARD = "LVCMOS25";
-------------------------------------------------------------------------------
-- TDC Core / CERN
-------------------------------------------------------------------------------
--
-- unit name: rotest
--
-- author: Sebastien Bourdeauducq, sebastien@milkymist.org
--
-- description: Ring oscillator HW test
--
-- references: http://www.ohwr.org/projects/tdc-core
--
-------------------------------------------------------------------------------
-- last changes:
-- 2011-10-22 SB Created file
-------------------------------------------------------------------------------
-- Copyright (C) 2011 CERN
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
-- the Free Software Foundation, version 3 of the License.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- DESCRIPTION:
-- Instantiates the ring oscillator and connects the output to the first LEMO
-- connector of the FMC 5ch DIO (J2), for easy observation of the signal.
-- Push button 0 is connected to the enable input of the ring oscillator.
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
library unisim;
use unisim.vcomponents.all;
library work;
use work.tdc_package.all;
entity rotest is
port(
en : in std_logic;
led : out std_logic;
out_p : out std_logic;
out_n : out std_logic;
oe_n : out std_logic
);
end entity;
architecture rtl of rotest is
signal out_se : std_logic;
begin
cmp_obuf: OBUFDS
generic map(
IOSTANDARD => "DEFAULT"
)
port map(
O => out_p,
OB => out_n,
I => out_se
);
cmp_ringosc: tdc_ringosc
generic map(
g_LENGTH => 401
)
port map(
en_i => en,
clk_o => out_se
);
led <= not en;
oe_n <= '0';
end architecture;
run
-ifn rotest.prj
-top rotest
-ifmt MIXED
-opt_mode SPEED
-opt_level 2
-ofn rotest.ngc
-p xc6slx45t-fgg484-3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment