How to access a variable in Verilog code from Python or C++

Hello, all!

I have searched the whole mailing list and find out there is a variable
in rssi.v file called rssi that is aimed to record rssi value, but i
don’t understand how to access or read that value from our python code,
i am not very familiar with verilog, could someone please tell me how to
read that variable in python code? Thanks a lot!

Bill

In short, there is no supported mechanism in place to read it currently.

There was work by myself and others to enable a richer interface using
m-blocks which transferred this value to the host (where you could read
it), but a lack of support to get my work interfaced to the rest of GNU
Radio (python and regular gr-blocks) has killed my motivation.

My suggestions to you would be dependent on what you plan to do with the
value.

  • George

_______________________________________________ Discuss-gnuradio mailing
list [email protected]
Discuss-gnuradio Info Page

On Mon, Nov 10, 2008 at 06:54:40PM -0800, Bill S. wrote:

Thank you, George. My plan is very simple, just to read the rssi
value whenever the receiver gets a valid packet, that’s why i want
to read and store that value. If i cannot access that variable, how
can i read the rssi value?

Bill,

By the time you read the RSSI, the reading will be pretty much
meaningless, since your read will take place long after the packet
data was received. That’s why George was/is passing the RSSI in the
packet header in the inband code.

Eric


From: Eric B. [email protected]
To: Bill S. [email protected]
Cc: George P Nychis [email protected]; [email protected]
Sent: Monday, November 10, 2008 10:04:55 PM
Subject: Re: [Discuss-gnuradio] how to access a variable in Verilog code
from Python or C++

Thank you for your help, Eric. From what you told me above, I reached
two conclusions: 1, reading RSSI will never happen on time, it is
useless.2, the only way out is to use the inband code, am I right?

So, could you tell me whether the inband code is reliable, if it is, I
will use that code immediately! Thank you!

Bill

Â
On Mon, Nov 10, 2008 at 06:54:40PM -0800, Bill S. wrote:

Thank you, George. My plan is very simple, just to read the rssi
value whenever the receiver gets a valid packet, that’s why i want
to read and store that value. If i cannot access that variable, how
can i read the rssi value? Â

Bill,

By the time you read the RSSI, the reading will be pretty much
meaningless, since your read will take place long after the packet
data was received. That’s why George was/is passing the RSSI in the
packet header in the inband code.

Eric

Thank you for your help, Eric. From what you told me above, I reached two
conclusions: 1, reading RSSI will never happen on time, it is useless.2,
the only way out is to use the inband code, am I right?

So, could you tell me whether the inband code is reliable, if it is, I
will use that code immediately! Thank you!

The inband code has no connection to anything else in GNU Radio, so you
can’t receive a packet with the inband code. So it can’t do what you
want.

  • George

Thank you, George. My plan is very simple, just to read the rssi value
whenever the receiver gets a valid packet, that’s why i want to read and
store that value. If i cannot access that variable, how can i read the
rssi value? Â

Bill.


From: George P Nychis [email protected]
To: Bill S. [email protected]
Cc: [email protected]
Sent: Monday, November 10, 2008 9:28:28 PM
Subject: Re: [Discuss-gnuradio] how to access a variable in Verilog code
from Python or C++

In short, there is no supported mechanism in place to read it currently.

There was work by myself and others to enable a richer interface using
m-blocks which transferred this value to the host (where you could read
it), but a lack of support to get my work interfaced to the rest of GNU
Radio (python and regular gr-blocks) has killed my motivation.

My suggestions to you would be dependent on what you plan to do with the
value.

  • George

From: George P Nychis [email protected]
To: Bill S. [email protected]
Cc: [email protected]; Eric B. [email protected]
Sent: Monday, November 10, 2008 11:39:47 PM
Subject: Re: [Discuss-gnuradio] how to access a variable in Verilog code
from Python or C++

Thank you again, George. I appreciate!! But what do you mean, it has no
connection to anything in Gnuradio, is it developed for gnuradio? So, do
you mean there is no way to read and store rssi on time? Thank you!

Bill

Thank you for your help, Eric. From what you told me above, I reached two
conclusions: 1, reading RSSI will never happen on time, it is useless.2,
the only way out is to use the inband code, am I right?

So, could you tell me whether the inband code is reliable, if it is, I
will use that code immediately! Thank you!

The inband code has no connection to anything else in GNU Radio, so you
can’t receive a packet with the inband code. So it can’t do what you
want.

  • George