'concat' not working (solved)

In the below link, pseudo random generator is implemented using LFSR in “rand_num_gen.py”.

The concat operation is not working in this code. More specifically, I want to replace the Lines 41-42 with “r_next.next = concat(feedback_value, r_reg[N+1:1])”.

AttributeError is showing for the concat operation " AttributeError: ‘Call’ object has no attribute ‘starargs’ ".


Define feedback_value as a single bit vector : Signal(intbv(0)[1:0])
I think you also can cast feedback_value in concat() :
concat(intbv(feedback_value)[1:0], r_reg[N+1:1])

I have no issue in conversion to either VHDL or Verilog.
What version of MyHDL are you using? What Python version?

P.S.: With all respect: you are coding an LFSR rather than a (true) random number generator :slight_smile:

Thank josyb, DrPi

I am using Python 3.6.2, MyHDL 0.9.0.
It is still not working

But I can run the code with assigning values individually,

r_next[N].next = feedback_value
r_next[N:0].next = r_reg[N+1:1]

Following is the error,

AttributeError: ‘Call’ object has no attribute ‘starargs’

It is working with MyHDL 1.0.

Thanks for your help.