EmbDev.net

Forum: FPGA, VHDL & Verilog Reversing bits


von puka1012 (Guest)


Rate this post
useful
not useful
Ich habe eine hexadecimal addresse ABCD1234.Wie kann ich es reverse 
bekommen.Configuration website von ethernet zeigt 0x3412CDAB(Die werte 
von diese hexadecimal addresse wird von miso auf signal tap 
gelesen)aber,webseite muss genauso wie ABCD1234 zeigen.Wie kann ich es 
machen(Besser wäre wenn jemanden auf englisch erklärt)

: Moved by Moderator
von Max D. (max_d)


Rate this post
useful
not useful
What programming language ?
Genral idea: Write into array in one direction, read from it in the 
other direction....

von puka1012 (Guest)


Rate this post
useful
not useful
VHDL

von Max D. (max_d)


Rate this post
useful
not useful
You generate a website with VHDL ?
Maybe give some further explanation how the data is transfered from the 
SPI-Interface (judging from the signal-name miso) to the website...

von puka1012 (Guest)


Rate this post
useful
not useful
i dont generate website with vhdl.Instead i have a embedded system board 
with FPGA in it to which transfer takes place.However,there is a website 
of the entire board(ethernet)(It has even microcontroller and like i 
said,FPGA as well)...From the website FPGA is triggered and we get the 
hexadecimal address

von .. (Guest)


Rate this post
useful
not useful
Max D. schrieb:
> What programming language ?
> Genral idea: Write into array in one direction, read from it in the
> other direction....

;-) das ist eine gute idee!
auf sowas einfaches bin ich noch gar nicht gekommen ;-)
und werde es zukünftig so machen bei MSB / LSB

txs
..

von Max D. (max_d)


Rate this post
useful
not useful
.. schrieb:
> Max D. schrieb:
>> What programming language ?
>> Genral idea: Write into array in one direction, read from it in the
>> other direction....
>
> ;-) das ist eine gute idee!
> auf sowas einfaches bin ich noch gar nicht gekommen ;-)
> und werde es zukünftig so machen bei MSB / LSB
>
> txs
> ..

Danke für die Lorbeeren :)
Is halt der übliche deal Speicher gegen Laufzeit

puka1012 schrieb:
> (It has even microcontroller and like i
> said,FPGA as well)

I have very little knowledge of VHDL (and programmable logic in 
general), therefore my approach would be to do the adjustment inside the 
µC on the Board. The way the data looks suggests to me, that the 
endianess of the two SPI-Devices doesn't match...

von Gerald M. (gerald_m17)


Rate this post
useful
not useful
You just have to swap byte 1 and 2, and byte 3 and 4. Then you have to 
swap the to words.
How you do this depends on how you store the data (eg std_logic_vector, 
signed, integer...)

von Achim S. (Guest)


Rate this post
useful
not useful
1
   function swapbytes(din:std_logic_vector(31 downto 0)) return std_logic_vector is 
2
   begin
3
      return din(7 downto 0) & din(15 downto 8) & din(23 downto 16) & din(31 downto 24);
4
   end function;

von P. K. (pek)


Rate this post
useful
not useful
Max D. schrieb:
> Is halt der übliche deal Speicher gegen Laufzeit

Blödsinn. Der Swap kostet Dich rein gar nichts. Die Drähte zwischen 
Quelle (dort wo die Adresse herkommt) und Senke (dort wo die Adresse 
benötigt wird) liegen einfach anders...

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
Achim S. schrieb:
> function swapbytes
Das kann man auch ganz ohne Funktion schreiben, wenn man es nur einmal 
braucht...

puka1012 schrieb:
> However,there is a website
... for English written posts: 
https://embdev.net/forum/fpga-vhdl-verilog
This here is the German forum!

: Edited by Moderator
von Werktätiger (Guest)


Rate this post
useful
not useful
Lothar M. schrieb:
>> However,there is a website
> ... for English written posts:
> https://embdev.net/forum/fpga-vhdl-verilog
> This here is the German forum!

You mean German-speaking ?! Or Germany's citizens?

Mit Gruß,

von Grmml (Guest)


Rate this post
useful
not useful
Werktätiger schrieb:
> You mean German-speaking ?! Or Germany's citizens?

Of course Lothar means German speaking. Here in the forum, everyone is 
welcome.

von Lothar M. (Company: Titel) (lkmiller) (Moderator)


Rate this post
useful
not useful
I wrote "written" instead of "spoken", but my intention should be fairly 
clear:
You can reside in any part of the world and speak any language. But 
here (mikrocontroller.net) you should write German and there 
(embdev.net) you should write English...

: Edited by Moderator
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.