Hey Veronia,

Thanks for bringing this to our attention. The issue is we're starting to
move from Python 2 to Python 3 and this appears to be another teething
problem. In Python 2 the `i/4` at line 270 will floor to an int. In Python3
it will return a float (obviously not a valid index for a list).

I'll look into fixing this on our develop branch, but I believe this can be
fixed by changing this to `i//4`. I.e.: ` mem_ctrls[i].port =
xbar[i//4].master`.

Kind regards,
Bobby
--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Mon, Feb 1, 2021 at 11:38 AM Veronia Bahaa via gem5-users <
gem5-users@gem5.org> wrote:

> Hello,
> I am new to gem5. When I try to run the gem5 using HMC configurations
> build/ARM/gem5.opt configs/example/hmc_hello.py
> or
> build/ARM/gem5.opt configs/example/hmctest.py
>
> I get this error
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "build/ARM/python/m5/main.py", line 457, in main
>     exec(filecode, scope)
>   File "configs/example/hmc_hello.py", line 63, in <module>
>     MemConfig.config_mem(options, system)
>   File "/home/veronia/gem5/configs/common/MemConfig.py", line 270, in
> config_mem
>     mem_ctrls[i].port = xbar[i/4].master
> TypeError: list indices must be integers or slices, not float
>
> Thanks,
> Veronia
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to