On Jan 29, 3:18 pm, Gabor <ga...@alacron.com> wrote:
> On Jan 29, 8:00 am, jleslie48 <j...@jonathanleslie.com> wrote:
>
>
>
> > On Jan 28, 8:07 pm, Brian Drummond <brian_drumm...@btconnect.com>
> > wrote:
>
> > > On Wed, 28 Jan 2009 13:26:20 -0800 (PST), jleslie48
>
> > > <j...@jonathanleslie.com> wrote:
> > > >I switch 'sources for' from implementation to 'behavioral
> > > >simulation'
> > > ...
> > > >Project Navigator will create a new skeleton source with the following
> > > >spec:
> > > >Add to Project: Yes
> > > >Source Directory: C:\jon
> > > >\fpga_uarted_01\2009_01_26\LOKI_New_H_Project_VHD L\Code_Versions\10 -
> > > >New_Xilinx_Wrap_Data\LOKI_Top
> > > >Source Type: VHDL Test Bench
> > > >Source Name: abcd.vhd
>
> > > >Association: LOKI_TOP
>
> > > all that looks OK and you FOUND the simulator page (took me a while!).
> > > Which sim do you have? ISE sim or Modelsim?
>
> > > ... but the question is, when>I click finish,
>
> > > what happens in the console window at the bottom? I see the
> > > UnitUnderTest being compiled so that the wizard knows how to wire it up
> > > for testing. Is that compilation failing? Might explain the problem.
>
> > > Or, if the wizard won't play, just "add copy of source" a testbench from
> > > one of the example projects into your project and edit it to suit.
>
> > > - Brian
> > > (LOKI? He's our cat!)
>
> > sim is ISE but the original behavorial simulation was done using
> > Modelsim,
> > and I think its confused.
>
> > not a thing is showing up in the console window at the bottom quiet as
> > a mouse.
> > that is consistent with the fact that abcd.vhd was never created
> > either.
>
> > Loki - god of mischef.
>
> Did you look for the file in your project directory? Which
> view did the source not appear in? Normally testbenches only
> appear in the view for "Behavioral Simulation", not the
> "Synthesis" view (default).
yeah I tried that, even did a search of the entire C:\ drive
it didn't make it.
I have solved the problem though. It's a bug in ISE 10.1.103
It simply will not let you re-run new source-->vhdl test bench
once you have done it once under modelsim and then switch the
properties to ISE simulator. I don't know if the problem has other
variations.
To get around the problem I made a brand new project from scratch
stating from the get go ISE Simulator. Added all the sources, SIG'ed
it (Syntesize, Implement, Generate) then switched to Behavioral
Simulation view,
added new source-->vhdl test bench ... and then it worked, actually
made the
testbench program:
-----------------------------------------------
--------------------------------------------------------------------------------
-- Company:
-- Engineer:
--
-- Create Date: 14:27:37 01/29/2009
-- Design Name:
-- Module Name: C:/jon/fpga_uarted_01/2009_01_28_jl_mod/11jlmod/
ccuart01/source/loki_top_tb.vhd
-- Project Name: ccuart01
-- Target Device:
-- Tool versions:
-- Description:
--
-- VHDL Test Bench Created by ISE for module: LOKI_TOP
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
-- Notes:
-- This testbench has been automatically generated using types
std_logic and
-- std_logic_vector for the ports of the unit under test. Xilinx
recommends
-- that these types always be used for the top-level I/O of a design
in order
-- to guarantee that the testbench will bind correctly to the post-
implementation
-- simulation model.
--------------------------------------------------------------------------------
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
USE ieee.std_logic_unsigned.all;
USE ieee.numeric_std.ALL;
ENTITY loki_top_tb IS
END loki_top_tb;
ARCHITECTURE behavior OF loki_top_tb IS
-- Component Declaration for the Unit Under Test (UUT)
COMPONENT LOKI_TOP
PORT(
SYSTEM_CLOCK : IN std_logic;
RS232_DSR_OUT : OUT std_logic;
RS232_TX_DATA : OUT std_logic;
RS232_CTS_OUT : OUT std_logic;
RS232_RX_DATA : IN std_logic;
LED_0 : OUT std_logic;
LED_1 : OUT std_logic;
LED_2 : OUT std_logic;
LED_3 : OUT std_logic
);
END COMPONENT;
--Inputs
signal SYSTEM_CLOCK : std_logic := '0';
signal RS232_RX_DATA : std_logic := '0';
--Outputs
signal RS232_DSR_OUT : std_logic;
signal RS232_TX_DATA : std_logic;
signal RS232_CTS_OUT : std_logic;
signal LED_0 : std_logic;
signal LED_1 : std_logic;
signal LED_2 : std_logic;
signal LED_3 : std_logic;
BEGIN
-- Instantiate the Unit Under Test (UUT)
uut: LOKI_TOP PORT MAP (
SYSTEM_CLOCK => SYSTEM_CLOCK,
RS232_DSR_OUT => RS232_DSR_OUT,
RS232_TX_DATA => RS232_TX_DATA,
RS232_CTS_OUT => RS232_CTS_OUT,
RS232_RX_DATA => RS232_RX_DATA,
LED_0 => LED_0,
LED_1 => LED_1,
LED_2 => LED_2,
LED_3 => LED_3
);
-- No clocks detected in port list. Replace <clock> below with
-- appropriate port name
-- constant system_clock_period := 10ns;
--ERROR:HDLCompiler:806 - "source/loki_top_tb.vhd" Line 87. Syntax
error near constant
--ERROR:HDLCompiler:841 - "source/loki_top_tb.vhd" Line 87. Type error
near ns ; expected type void
--ERROR:HDLCompiler:69 - "source/loki_top_tb.vhd" Line 92.
system_clock_period is not declared
system_clock_process

rocess
begin
system_clock <= '0';
--wait for system_clock_period/2;
wait for 10ns/2;
system_clock <= '1';
--wait for system_clock_period/2;
wait for 10ns/2;
end process;
-- Stimulus process
stim_proc: process
begin
-- hold reset state for 100ms.
wait for 100ns;
--wait for system_clock_period*10;
wait for 10ns*10;
-- insert stimulus here
wait;
end process;
END;
-----------------------------------------------
although I kept getting an error on this line:
constant system_clock_period := 10ns;
--ERROR:HDLCompiler:806 - "source/loki_top_tb.vhd" Line 87. Syntax
error near constant
--ERROR:HDLCompiler:841 - "source/loki_top_tb.vhd" Line 87. Type error
near ns ; expected type void
--ERROR:HDLCompiler:69 - "source/loki_top_tb.vhd" Line 92.
system_clock_period is not declared
anybody know whats wrong with the syntax???