EmbDev.net

Forum: FPGA, VHDL & Verilog Reversing bits


Author: puka1012 (Guest)
Posted on:

Rate this post
0 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
Author: Max D. (max_d)
Posted on:

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

Author: puka1012 (Guest)
Posted on:

Rate this post
0 useful
not useful
VHDL

Author: Max D. (max_d)
Posted on:

Rate this post
0 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...

Author: puka1012 (Guest)
Posted on:

Rate this post
0 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

Author: .. (Guest)
Posted on:

Rate this post
0 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
..

Author: Max D. (max_d)
Posted on:

Rate this post
0 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...

Author: Gerald M. (gerald_m17)
Posted on:

Rate this post
0 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...)

Author: Achim S. (Guest)
Posted on:

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

Author: P. K. (pek)
Posted on:

Rate this post
0 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...

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 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
Author: Werktätiger (Guest)
Posted on:

Rate this post
-1 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ß,

Author: Grmml (Guest)
Posted on:

Rate this post
0 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.

Author: Lothar Miller (lkmiller) (Moderator)
Posted on:

Rate this post
0 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

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [vhdl]VHDL code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.