![]() |
|
|
|
#1 |
|
Hi,
is it possible to use generic entities inside packages? The following code will not pass modelsim. The error is: # ** Error: ../source/vhdl/tb_pkg.vhd(67): near "architecture": expecting: END What is wrong? Thanks Olaf library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; package tb_pkg is component clock_source is generic ( PERIOD : time := 10 ns; RESET_TIME : time := 50 ns; RESET_ACTIVE : std_logic := '1'); port ( clk : out std_logic; reset : out std_logic; stop : in std_logic); end component; end package; package body tb_pkg is -- entity clock_source is -- generic ( -- PERIOD : time := 10 ns; -- RESET_TIME : time := 30 ns; -- RESET_ACTIVE : std_logic := '1'); -- port ( -- clk : out std_logic; -- reset : out std_logic; -- stop : in std_logic); -- end entity; architecture behavioral of clock_source is -- line 67 begin process (clk, reset, stop) is begin clk <= '0'; if (now < RESET_TIME) then reset <= RESET_ACTIVE; else reset <= not RESET_ACTIVE; end if; if stop then wait; end if; wait for PERIOD/2; clk <= '1'; wait for PERIOD/2; end process; end architecture; end package; Olaf Petzold |
|
|
|
|
#2 |
|
Posts: n/a
|
Olaf Petzold wrote:
> is it possible to use generic entities inside packages? I can *instance* entities but I can only package declarations. -- Mike Treseler Mike Treseler |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| enterprisedb package execution | kanchuparthi.rams | Software | 0 | 05-22-2008 01:59 PM |
| Complete package of DVD solutions | mikeriv | Software | 0 | 03-28-2007 02:33 PM |
| The Practice Test Package Development: A New Service on the Certification Market | David Johnson | A+ Certification | 0 | 01-19-2005 10:52 AM |
| Netflix Moving to Generic Discs. | One-Shot Scot | DVD Video | 28 | 11-23-2004 11:14 PM |
| PC Package deals? | jkl | A+ Certification | 0 | 10-28-2004 05:12 PM |