unerklärliche Fehlermeldung

Gast #2289773
Lesenswert?
• ▲
▼
Hallo Leute!

Ich hab ein einfaches VHDL Progrämmchen geschrieben, ein Inverter, und 
dazu eine Testbench. So, Modelsim will aber nicht so richtig .... Also 
hier mal mein Code:
1
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.numeric_std.all;
4
use work.all;
5

6
entity inverter is 
7
port (
8
  input: in std_ulogic;
9
  output: out std_ulogic;
10
  clock_i: in std_ulogic;
11
  reset_i: in std_ulogic);
12
end inverter;
13

14
architecture behav of inverter is 
15
begin
16
  
17
  cr: process(reset_i,clock_i) is
18
  if reset_i='1' then 
19
    output<= '0';
20
  elsif rising_edge(clock_i) then 
21
    output<= next_output;
22
  end if;
23
end process cr;
24

25
  op: process(input)is
26
  next_output<= not input; 
27
  end process op;
28
  
29
end architecture;

Nun, alles schön und gut.... kompiliere ich aber nun die TB findet er 
einen merkwürdigen Fehler:
1
Unknown identifier "clock_i".
1
Unknown identifier "reset_i".

Dieser Fehler tritt lt. Modelsim durch das Mapping auf
1
Mapping: entity inverter(behav)
2
port map (input => input_tb,
3
          output => output_tb,
4
          clock_i => clock_tb,
5
          reset_i => reset_tb);


Nur ich kann ihn nicht sehen.....
Vielen Dank für jeden Tipp
Gast #2290438
Lesenswert?
• ▲
▼
Ich habe den Fehler jetzt gefunden.... Es lag wirklich am Projekt 
selbst, bzw. an einem typischen Beginner-Fehler. Ich muss ja jedes .vhd 
file extra komplieren!

Gibt es dazu vielleicht eine Möglichkeit dieses extra Kompilieren zu 
optimieren.... wie zum Beispiel durch eine Befehlsreihe im Terminal?
Gast #2290451
Lesenswert?
• ▲
▼
MelonWars schrieb:
> wie zum Beispiel durch eine Befehlsreihe im Terminal?
So z.B.:
1
# Xilinx WebPack modelsim script
2
#
3
# 
4
# cd C:/workspace/zpu/zpu/hdl/example
5
# do simzpu_small.do
6

7
set BreakOnAssertion 1
8
vlib work
9

10
vcom -93 -explicit  zpu_config.vhd
11
vcom -93 -explicit  ../zpu4/core/zpupkg.vhd
12
vcom -93 -explicit  ../zpu4/src/txt_util.vhd
13
vcom -93 -explicit  sim_small_fpga_top_noint.vhd
14
vcom -93 -explicit  ../zpu4/core/zpu_core_small.vhd
15
vcom -93 -explicit  helloworld.vhd
16
vcom -93 -explicit  ../zpu4/src/timer.vhd
17
vcom -93 -explicit  ../zpu4/src/io.vhd
18
vcom -93 -explicit  ../zpu4/src/trace.vhd
19

20
# run ZPU
21
vsim fpga_top
22
view wave
23
add wave -recursive fpga_top/zpu/*
24
#add wave -recursive fpga_top/*
25
view structure
26
#view signals
27

28
# Enough to run tiny programs
29
run 10 ms

Duke

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren