[EXTERNAL EMAIL]
Hi Giacomo,
Thank you so much for your reply.
I successfully accessed phymem from C program base on simple.py. For
example, accessed 0x800000 from C program.
But my ultimate goal is to access tlm_slave from C program. So I add a
tlm_slave in simple.py, below is my simple.py.
system = System()
system.membus = IOXBar(width=16)
system.physmem = SimpleMemory(range = AddrRange(Addr('0'), size='16MB'))
system.physmem.port = system.membus.master
system.mem_mode = 'timing'
# Create a simple CPU
system.cpu = TimingSimpleCPU()
# Hook the CPU ports up to the membus
system.cpu.icache_port = system.membus.slave
system.cpu.dcache_port = system.membus.slave
binary = './../../tests/test-progs/hello/src/hello'
process = Process()
process.cmd = [binary]
# Set the cpu to use the process as its workload and create thread contexts
system.cpu.workload = process
system.cpu.createThreads()
system.clk_domain = SrcClockDomain(clock = '1.5GHz',
voltage_domain = VoltageDomain(voltage = '1V'))
# Create a external TLM port:
system.tlm = ExternalSlave()
system.tlm.addr_ranges = [AddrRange(Addr('16MB'), size='16MB')]
system.tlm.port_type = "tlm_slave"
system.tlm.port_data = "transactor"
# Route the connections:
system.system_port = system.membus.slave
system.membus.master = system.tlm.port
# Start the simulation:
root = Root(full_system = False, system = system)
m5.instantiate()
m5.simulate()
And i got the following error message when accessed tlm_slave from C program:
"panic: Page table fault when accessing virtual address 0x1000000".
Could you please give me some advices how to access tlm_slave from C program?
Or does access tlm_slave from C program really realize in current gem5 edition?
BRs &Thanks
Haizhou
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users