Hallo,
Ich habe ein problem mit einem selbst definierten Typen.
Ich habe folgendes Package:
1 | PACKAGE types IS
|
2 | type alu_instruction is ( add, sub);
|
3 | END types;
|
Diesen Typ verwende ich in einem anderen Stück Code:
1 | LIBRARY cpu0_lib;
|
2 | USE cpu0_lib.types.alu_instruction;
|
3 |
|
4 | ENTITY cu IS
|
5 | PORT(
|
6 | ....
|
7 | op : OUT alu_instruction;
|
8 | ....
|
9 | );
|
10 | END cu;
|
11 |
|
12 | ARCHITECTURE rtl OF cu IS
|
13 | BEGIN
|
14 | process(instr)
|
15 | begin
|
16 | ....
|
17 | if( instr(25 downto 24) = "00") then
|
18 | op <= add;
|
19 | else
|
20 | op <= sub;
|
21 | end if;
|
22 | .....
|
Wenn ich das ganze mit ModelSIM Simuliere funktioniert alles perfekt...
Wenn ich das Ganze aber mit XST Synthetisieren will bekomme ich mehrere
Fehler:
1 | ERROR:HDLParsers:3313 - "C:/HDS/cpu0/cpu0_lib/hdl/cu_rtl.vhd" Line 57. Undefined symbol 'add'. Should it be: and?
|
2 | ERROR:HDLParsers:1209 - "C:/HDS/cpu0/cpu0_lib/hdl/cu_rtl.vhd" Line 57. add: Undefined symbol (last report in this block)
|
3 | ERROR:HDLParsers:800 - "C:/HDS/cpu0/cpu0_lib/hdl/cu_rtl.vhd" Line 59. Type of op is incompatible with type of sub.
|
4 | ERROR:HDLParsers:800 - "C:/HDS/cpu0/cpu0_lib/hdl/cu_rtl.vhd" Line 72. Type of op is incompatible with type of sub.
|
5 | ERROR:HDLParsers:800 - "C:/HDS/cpu0/cpu0_lib/hdl/cu_rtl.vhd" Line 85. Type of op is incompatible with type of sub.
|
Kann mir jemand sagen was ich falsch gemacht habe?
lg
Andreas