von
Heiko (Gast)
22.10.2009 14:32
Hi,
ich bin noch ziemlich unerfahren mit vhdl vondaher bitte ich um etwas
nachsicht.
Mein Problem:
habe eine datei analysis.vhd mit folgender entity: 1 entity analysis is
2
3 port (
4 analysisClk : in std_logic ;
5 analysisReset : in std_logic ;
6 analysisHSync : in std_logic ;
7 analysisVSync : in std_logic ;
8 analysisDE : in std_logic ;
9
10 formatChange : out std_logic ;
11 resetFormatChange : in std_logic ;
12
13 -- analysisResults
14 aResult_totalPix : inout std_logic_vector ( 11 downto 0 );
15 aResult_totalLines : inout std_logic_vector ( 10 downto 0 );
16 aResult_activePix : out std_logic_vector ( 11 downto 0 );
17 aResult_activeLines : out std_logic_vector ( 10 downto 0 );
18 aResult_hSync : out std_logic_vector ( 5 downto 0 );
19 aResult_vSync : out std_logic_vector ( 5 downto 0 );
20 aResult_horizontalFrontPorch : out std_logic_vector ( 9 downto 0 );
21 aResult_horizontalBackPorch : out std_logic_vector ( 9 downto 0 );
22 aResult_hSyncPolarity : out std_logic ;
23 aResult_verticalFrontPorch : out std_logic_vector ( 2 downto 0 );
24 aResult_verticalBackPorch : out std_logic_vector ( 5 downto 0 );
25 aResult_vSyncPolarity : out std_logic
26
27 );
28
29 end ;
meine zweite datei mux_displayUnit.vhd hat folgende entity: 1 entity mux_displayUnit is
2
3 port (
4 muxClk : in std_logic ;
5
6 -- signal to select which data will be used
7 sel : in std_logic_vector ( 7 downto 0 );
8
9 -- signaldata handed from the analysis
10 anaResult_pixHorizontal : in std_logic_vector ( 11 downto 0 );
11 anaResult_linesVertical : in std_logic_vector ( 10 downto 0 );
12 anaResult_pixTotalHorizontal : in std_logic_vector ( 11 downto 0 );
13 anaResult_linesTotalVertical : in std_logic_vector ( 10 downto 0 );
14 anaResult_syncPixHorizontal : in std_logic_vector ( 5 downto 0 );
15 anaResult_syncPixVertical : in std_logic_vector ( 5 downto 0 );
16 anaResult_frontPorchHorizontal : in std_logic_vector ( 9 downto 0 );
17 anaResult_frontPorchVertical : in std_logic_vector ( 2 downto 0 );
18 anaResult_backPorchHorizontal : in std_logic_vector ( 9 downto 0 );
19 anaResult_backPorchVertical : in std_logic_vector ( 5 downto 0 );
20 anaResult_syncPolarityHorizontal : in std_logic ;
21 anaResult_syncPolarityVertical : in std_logic ;
22
23 );
in der top.vhd habe ich folgenden eintrag: 1 bb : analysis
2 port map (
3 analysisClk => Clk_G ,
4 analysisReset => S_Reset ,
5 analysisHSync => internH ,
6 analysisVSync => internV ,
7 analysisDE => internDE ,
8 aResult_totalPix => anaResult_pixTotalHorizontal ,
9 aResult_totalLines => anaResult_linesTotalVertical ,
10 aResult_activePix => anaResult_pixHorizontal ,
11 aResult_activeLines => anaResult_linesVertical ,
12 aResult_hSync => anaResult_syncPixHorizontal ,
13 aResult_vSync => anaResult_syncPixVertical ,
14 aResult_horizontalFrontPorch => anaResult_frontPorchHorizontal ,
15 aResult_horizontalBackPorch => anaResult_backPorchHorizontal ,
16 aResult_hSyncPolarity => anaResult_syncPolarityHorizontal ,
17 aResult_verticalFrontPorch => anaResult_frontPorchVertical ,
18 aResult_verticalBackPorch => anaResult_backPorchHorizontal ,
19 aResult_vSyncPolarity => anaResult_syncPolarityVertical ,
20 formatChange => formatChange ,
21 resetFormatChange => resetFormatChange
22
23
24 );
ich will sozusagen die anliegen signal einfach nur durchreichen... d.h.
von den "out"-ports (analysis.vhd) zu den "in"-ports
(mux_displayUnit.vhd) weiterleiten ohne diese irgendwie zu verändern
oder sonst...
leider bekomm ich folgende fehlermeldung: 1 top.vhd(210): ERROR: anaresult_pixtotalhorizontal with mode 'in' cannot be updated
2 top.vhd(211): ERROR: anaresult_linestotalvertical with mode 'in' cannot be updated
3 top.vhd(212): ERROR: anaresult_pixhorizontal with mode 'in' cannot be updated
4 top.vhd(213): ERROR: anaresult_linesvertical with mode 'in' cannot be updated
5 top.vhd(214): ERROR: anaresult_syncpixhorizontal with mode 'in' cannot be updated
6 top.vhd(215): ERROR: anaresult_syncpixvertical with mode 'in' cannot be updated
7 top.vhd(216): ERROR: anaresult_frontporchhorizontal with mode 'in' cannot be updated
8 top.vhd(217): ERROR: anaresult_backporchhorizontal with mode 'in' cannot be updated
9 top.vhd(218): ERROR: anaresult_syncpolarityhorizontal with mode 'in' cannot be updated
10 top.vhd(219): ERROR: anaresult_frontporchvertical with mode 'in' cannot be updated
11 top.vhd(220): ERROR: anaresult_backporchhorizontal with mode 'in' cannot be updated
12 top.vhd(221): ERROR: anaresult_syncpolarityvertical with mode 'in' cannot be updated
leider verstehe ich nicht warum der Fehler auftritt, die "modes"
(in/out) sind doch richtig oder ?
vielen dank im vorraus
grüße heiko
hi,
das hab ich auch schon versucht. du musst in deiner top.vhd
"zwischensignale" deklarieren und diese dann den jeweiligen ports
zuweisen.
mfg
Andi
von
Heiko (Gast)
22.10.2009 14:37
boah das ging zügig mit der antwort.... vielen vielen dank !
werds gleich umsetzen :)
von
Lothar M.
(Firma: Titel)
(lkmiller )
(Moderator )
22.10.2009 14:39
z.B.
aResult_totalLines ist ein inout Port, da kann also auch was
herauskommen.
anaResult_linesTotalVertical ist ein in Port, da kann nur was
hineingehen.
Und jetzt willst du dem aResult_totalLines vom
anaResult_linesTotalVertical etwas zuweisen. Das geht nicht.
inout Ports solltest du nur dort verwenden, wo auch entsprechende
bidirketionale Bauelemente im FPGA vorhanden sind: direkt in der
Top-Entity an den IO-Pins.
Welche Signalflussrichtung hat dein aResult_totalLines wiklich?
von
Heiko (Gast)
22.10.2009 15:13
aResult_totalLines müsste eigentlich wie die anderen auch "out" sein.
ich möchte eigentlich nur die ergebnisse die mir die analysis.vhd an
ihren "out"-ports liefert verknüpfen mit den "in"-ports vom
mux_displayUnit.vhd
ich hab nun "zwischensignale" erstellt , der aussschnitt von der top.vhd
entity:
1 tempAnaResult_pixHorizontal : inout std_logic_vector ( 11 downto 0 );
2 tempAnaResult_linesVertical : inout std_logic_vector ( 10 downto 0 );
3 tempAnaResult_pixTotalHorizontal : inout std_logic_vector ( 11 downto 0 );
4 tempAnaResult_linesTotalVertical : inout std_logic_vector ( 10 downto 0 );
5 tempAnaResult_syncPixHorizontal : inout std_logic_vector ( 5 downto 0 );
6 tempAnaResult_syncPixVertical : inout std_logic_vector ( 5 downto 0 );
7 tempAnaResult_frontPorchHorizontal : inout std_logic_vector ( 9 downto 0 );
8 tempAnaResult_frontPorchVertical : inout std_logic_vector ( 2 downto 0 );
9 tempAnaResult_backPorchHorizontal : inout std_logic_vector ( 9 downto 0 );
10 tempAnaResult_backPorchVertical : inout std_logic_vector ( 5 downto 0 );
11 tempAnaResult_syncPolarityHorizontal : inout std_logic ;
12 tempAnaResult_syncPolarityVertical : inout std_logic ;
diese wollte ich nun mit den jeweiligen ports von der analyse und dem
mux verbinden:
1 bb : analysis
2 port map (
3 analysisClk => Clk_G ,
4 analysisReset => S_Reset ,
5 analysisHSync => internH ,
6 analysisVSync => internV ,
7 analysisDE => internDE ,
8 aResult_totalPix => tempAnaResult_pixTotalHorizontal ,
9 aResult_totalLines => tempAnaResult_linesTotalVertical ,
10 aResult_activePix => tempAnaResult_pixHorizontal ,
11 aResult_activeLines => tempAnaResult_linesVertical ,
12 aResult_hSync => tempAnaResult_syncPixHorizontal ,
13 aResult_vSync => tempAnaResult_syncPixVertical ,
14 aResult_horizontalFrontPorch => tempAnaResult_frontPorchHorizontal ,
15 aResult_horizontalBackPorch => tempAnaResult_backPorchHorizontal ,
16 aResult_hSyncPolarity => tempAnaResult_syncPolarityHorizontal ,
17 aResult_verticalFrontPorch => tempAnaResult_frontPorchVertical ,
18 aResult_verticalBackPorch => tempAnaResult_backPorchHorizontal ,
19 aResult_vSyncPolarity => tempAnaResult_syncPolarityVertical ,
20 formatChange => formatChange ,
21 resetFormatChange => resetFormatChange
22
23 );
24
25 cc : mux_displayUnit
26 port map (
27 muxClk => Clk_G ,
28 tempAnaResult_pixTotalHorizontal => anaResult_pixTotalHorizontal ,
29 tempAnaResult_linesTotalVertical => anaResult_linesTotalVertical ,
30 tempAnaResult_pixHorizontal => anaResult_pixHorizontal ,
31 tempAnaResult_linesVertical => anaResult_linesVertical ,
32 tempAnaResult_syncPixHorizontal => anaResult_syncPixHorizontal ,
33 tempAnaResult_syncPixVertical => anaResult_syncPixVertical ,
34 tempAnaResult_frontPorchHorizontal => anaResult_frontPorchHorizontal ,
35 tempAnaResult_backPorchHorizontal => anaResult_backPorchHorizontal ,
36 tempAnaResult_syncPolarityHorizontal => anaResult_syncPolarityHorizontal ,
37 tempAnaResult_frontPorchVertical => anaResult_frontPorchVertical ,
38 tempAnaResult_backPorchVertical => anaResult_backPorchVertical ,
39 tempAnaResult_syncPolarityVertical => anaResult_syncPolarityVertical
40 );
nur bekomme ich nun leider wieder folgenden fehler: 1 top.vhd(294): ERROR: anaresult_pixtotalhorizontal with mode 'in' cannot be updated
2 top.vhd(295): ERROR: anaresult_linestotalvertical with mode 'in' cannot be updated
3 top.vhd(296): ERROR: anaresult_pixhorizontal with mode 'in' cannot be updated
4 top.vhd(297): ERROR: anaresult_linesvertical with mode 'in' cannot be updated
5 top.vhd(298): ERROR: anaresult_syncpixhorizontal with mode 'in' cannot be updated
6 top.vhd(299): ERROR: anaresult_syncpixvertical with mode 'in' cannot be updated
7 top.vhd(300): ERROR: anaresult_frontporchhorizontal with mode 'in' cannot be updated
8 top.vhd(301): ERROR: anaresult_backporchhorizontal with mode 'in' cannot be updated
9 top.vhd(302): ERROR: anaresult_syncpolarityhorizontal with mode 'in' cannot be updated
10 top.vhd(303): ERROR: anaresult_frontporchvertical with mode 'in' cannot be updated
11 top.vhd(304): ERROR: anaresult_backporchvertical with mode 'in' cannot be updated
12 top.vhd(305): ERROR: anaresult_syncpolarityvertical with mode 'in' cannot be updated
13 top.vhd(328): ERROR: unit top_arch ignored due to previous errors
wobei sich die fehlermeldung auf die einträge des mux_displayUnit
beziehen
...
was habe ich falsch gemacht?
von
Heiko (Gast)
22.10.2009 15:24
ahhh ich habs !!!
die zuweisung war verdreht:
aus 1 tempAnaResult_pixTotalHorizontal => anaResult_pixTotalHorizontal ,
muss 1 anaResult_pixTotalHorizontal => tempAnaResult_pixTotalHorizontal ,
werden usw.
und natürlich muss ich das portmapping entsprechend für das comonent
angelegt werd aus dem die hilfssignale stammen ... in meinem falle top:
1 dd : top
2 port map (
3 anaResult_pixTotalHorizontal => tempAnaResult_pixTotalHorizontal ,
4 anaResult_linesTotalVertical => tempAnaResult_linesTotalVertical ,
5 anaResult_pixHorizontal => tempAnaResult_pixHorizontal ,
6 anaResult_linesVertical => tempAnaResult_linesVertical ,
7 anaResult_syncPixHorizontal => tempAnaResult_syncPixHorizontal ,
8 anaResult_syncPixVertical => tempAnaResult_syncPixVertical ,
9 anaResult_frontPorchHorizontal => tempAnaResult_frontPorchHorizontal ,
10 anaResult_backPorchHorizontal => tempAnaResult_backPorchHorizontal ,
11 anaResult_syncPolarityHorizontal => tempAnaResult_syncPolarityHorizontal ,
12 anaResult_frontPorchVertical => tempAnaResult_frontPorchVertical ,
13 anaResult_backPorchVertical => tempAnaResult_backPorchVertical ,
14 anaResult_syncPolarityVertical => tempAnaResult_syncPolarityVertical
15 );
ich möchte mich wirklich für die schnelle und tolle hilfe bedanken...
heiko
hi,
hast du gerade nur die ports geändert?? also aus in -> inout gemacht??
deine deklarationen waren ja schon richtig. ausser das man vllt auf
inout ports verzichten sollte.
ich dachte eigentlich an sowas:
analysis.vhd | top.vhd | mux_dingsbums.vhd
out signal -> zwischensignal -> in signal
du musste also in der top.vhd signale deklarieren:
z.b
signal pixel_bla : std_logic;...
und in der analysis port map ans richtige signal hängen und in der
mux_dingsbum port map ans richtige signal legen. eins muss dabei immer
input und eins output sein.
so z.b
1 RAM_MODUL_A : ram_a
2 port map (
3 WrAdrA => wr_adr_a ,
4 RdAdrA => rd_adr_a ,
5 DataA => data ,
6 WeA => we_a ,
7 RdClkA => rdck_2_ram ,
8 RdClkA_en => rdck_a_en ,
9 ResetA => reset ,
10 WrClkA => bick ,
11 WrClkA_en => wrck_a_en ,
12 Q_A => sdto_a_i
13
14 );
15
16 CNTL_A_RAM : cntl_a
17 port map (
18 bi_clk => bick ,
19 lr_clk => lrck ,
20 rd_clk => rdck ,
21
22 reset => reset ,
23
24 ram_b_full => ram_b_f ,
25 ram_full => ram_a_f ,
26
27 --Signale RAM_A--
28 wr_en_a => we_a ,
29 rd_en_a => rdck_a_en ,
30 wrck_a_e => wrck_a_en ,
31 WrAdr_a => wr_adr_a ,
32 RdAdr_a => rd_adr_a
33 );
mfg
Andi
von
Heiko (Gast)
22.10.2009 15:36
Hi Andy,
ja genauso hab ichs gemacht ....
die "inout"-ports sind noch reliquen von meinem Projekt-Vorgänger die
ich noch nicht angepasst habe.
also keine sorge hatte dich richtig verstanden und habe es auch so
umgesetzt ..
DANKE ;)
von
Duke Scarring (Gast)
22.10.2009 15:38
@Heiko:
Ein Tip: Wenn Du Dir was Gutes tun willst, schau Dir mal records [1]
an.
Duke
[1]
http://en.wikibooks.org/wiki/Programmable_Logic/VHDL_Data_Types#Records
von
Heiko (Gast)
22.10.2009 15:53
Ich nochmal,
hab nochmal ne frage:
unzwar wenn ich folgenden eintrag: 1 dd : top
2 port map (
3 anaResult_pixTotalHorizontal => tempAnaResult_pixTotalHorizontal ,
4 anaResult_linesTotalVertical => tempAnaResult_linesTotalVertical ,
5 anaResult_pixHorizontal => tempAnaResult_pixHorizontal ,
6 anaResult_linesVertical => tempAnaResult_linesVertical ,
7 anaResult_syncPixHorizontal => tempAnaResult_syncPixHorizontal ,
8 anaResult_syncPixVertical => tempAnaResult_syncPixVertical ,
9 anaResult_frontPorchHorizontal => tempAnaResult_frontPorchHorizontal ,
10 anaResult_backPorchHorizontal => tempAnaResult_backPorchHorizontal ,
11 anaResult_syncPolarityHorizontal => tempAnaResult_syncPolarityHorizontal ,
12 anaResult_frontPorchVertical => tempAnaResult_frontPorchVertical ,
13 anaResult_backPorchVertical => tempAnaResult_backPorchVertical ,
14 anaResult_syncPolarityVertical => tempAnaResult_syncPolarityVertical
15 );
in der top.vhd hinzufüge verschwinden zwar alle Fehlermeldungen
allerdings geht auch irgendwie die struktur meines projektes flöten.
D.H. das meine top.vhd nicht mehr als toplevel-entity erkannt wird und
ich kann sie auch nicht als toplevel-entity setzen.
kommentiere ich obigen eintrag heraus bekomme ich zwar logischer weise
fehlermeldungen aber die struktur des projektes ist in ordnung.
bin etwas verwirrt ...
screenshots im anhang um das mit der projekt-struktur besser zu
verdeutlichen
das "dd : top" ist meiner meinung nach garnicht nötig.
du brauchst einfach von jeder entity (also analysis und mux) eine
instanz in deiner top.vhd.
dann machst du die zwischensignale und verbindest die port von jeder
instanz mit dem zwischensignal.
die top.vhd bruachst du ja nicht zu instanzieren.
ich hoffe ich hab dich recht verstanden.
mfg
Andi
so z.b. 1 entity top_modul is
2 port (
3 bick : in std_logic ;
4 lrck : in std_logic ;
5 rdck : in std_logic ;
6 reset : in std_logic ;
7
8 sdti : in std_logic ;
9
10 sdto : out std_logic_vector ( 7 downto 0 )
11 );
12 end ;
13
14 architecture structure of top_modul is
15
16 signal we_buf_i : std_logic ;
17 signal wrck_e_i : std_logic ;
18 signal rdck_e_i : std_logic ;
19 signal rdck_buf : std_logic ;
20
21 signal wradd_buf_i : std_logic_vector ( 4 downto 0 );
22 signal rdadd_buf_i : std_logic_vector ( 4 downto 0 );
23
24 component cntl
25 port (
26 bi_clk : in std_logic ;
27 rd_clk : in std_logic ;
28 lr_clk : in std_logic ;
29
30 rst : in std_logic ;
31
32 wr_en : out std_logic ;
33 wr_clk_e : out std_logic ;
34 rd_clk_e : out std_logic ;
35 rdck_2_ram : out std_logic ;
36
37 wr_add : out std_logic_vector ( 4 downto 0 );
38 rd_add : out std_logic_vector ( 4 downto 0 )
39 );
40 end component ;
41
42
43 component ram_modul
44 port (
45 data_s : in std_logic ;
46 wr_adr : in std_logic_vector ( 4 downto 0 );
47 rd_adr : in std_logic_vector ( 4 downto 0 );
48
49 reset : in std_logic ;
50 WE : in std_logic ;
51 rd_clk : in std_logic ;
52 rd_clk_en : in std_logic ;
53
54 wr_clk : in std_logic ;
55 wr_clk_en : in std_logic ;
56
57 sdto : out std_logic_vector ( 7 downto 0 )
58 );
59 end component ;
60
61 begin
62
63 CONTROL : cntl
64 port map (
65 bi_clk => bick ,
66 rd_clk => rdck ,
67 lr_clk => lrck ,
68
69 rst => reset ,
70
71 wr_en => we_buf_i ,
72 wr_clk_e => wrck_e_i ,
73 rd_clk_e => rdck_e_i ,
74 rdck_2_ram => rdck_buf ,
75
76 wr_add => wradd_buf_i ,
77 rd_add => rdadd_buf_i
78 );
79
80
81 RAM : ram_modul
82 port map (
83 data_s => sdti ,
84 wr_adr => wradd_buf_i ,
85 rd_adr => rdadd_buf_i ,
86
87 reset => reset ,
88 WE => we_buf_i ,
89 rd_clk => rdck_buf ,
90 rd_clk_en => rdck_e_i ,
91
92 wr_clk => bick ,
93 wr_clk_en => wrck_e_i ,
94
95 sdto => sdto
96 );
97
98
99
100 end structure ;
mfg
von
Heiko (Gast)
26.10.2009 11:02
Hi Andy,
ja du hattest mich recht verstanden ... und ja es funktioniert jetzt mit
deiner Hilfe!
vielen herzlichen Dank !!!
Heiko
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.