Skip to content

Commit

Permalink
pipistrello: add double-cpu
Browse files Browse the repository at this point in the history
jordens committed Apr 5, 2015
1 parent c98e24a commit ef375b5
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion soc/targets/artiq_pipistrello.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
from misoclib.soc import mem_decoder
from targets.pipistrello import BaseSoC

from artiq.gateware import rtio, ad9858
from artiq.gateware import amp, rtio, ad9858


_tester_io = [
@@ -140,4 +140,27 @@ def __init__(self, platform, **kwargs):
self.add_wb_slave(mem_decoder(0xb0000000), self.dds.bus)


class Double(_QcAdapterBase):

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Apr 5, 2015

Member

We should have consistent naming in targets for uniprocessor/biprocessor subtargets and their common base class with the peripherals.

This comment has been minimized.

Copy link
@jordens

jordens Apr 5, 2015

Author Member

the peripherals things should be refactored out of the targets (mini, for ppro: single-cpu, 5 rtio, midi, for bigger things: single-cpu, all rtio, and maxi: amp, all rtio). and then the targets can mix and match those with the respective SoC. But scattering "ARTIQ" in the class names does not seem useful to me.

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Apr 5, 2015

Member

No, the peripheral definitions should stay in targets - there are differences such as the type of DDS chip, the maximum number of RTIO channels that a given board will support (irrespective of FPGA resource limitations), how those pins are named, etc.
ARTIQ in the class names produces clearly identified bitstreams in the misoc build folder.

This comment has been minimized.

Copy link
@jordens

jordens Apr 5, 2015

Author Member

Those peripherals are are exactly the same so far. The ppro adapter board, is the same as the pipistrello has the same hardware behind it. And the kc705 adapter board and hardware is also the same dds/ttl.
Maybe. But there are too many "ARTIQ"s around. It's in the module name, in the class and in the path.

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Apr 5, 2015

Member

The small bit of code that contains definitions for that old DDS/TTL system can be put in another module and factored, but I think (and hope) that most targets will not use it in the future.

This comment has been minimized.

Copy link
@jordens

jordens Apr 5, 2015

Author Member

Currently the code overlap is very large between all three supported platforms. And the future we are all waiting for will not land here for a while.

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Apr 5, 2015

Member

Ok, we can keep artiq in the target names (so that the typical build command is make.py -t artiq_xxx which won't conflict with another SoC for the same board), modify misoc so that the target names end up in bitstream filenames, and remove the ARTIQ prefixes from the subtarget class names.
How should we name the latter then? UniprocSoC/BiprocSoC?

This comment has been minimized.

Copy link
@jordens

jordens Apr 5, 2015

Author Member

Aren't they all socs anyway? What about UP and AMP (i assume that's for assymetric multiprocessing)? Let's not get too close to arduino Due and Uno...

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Apr 5, 2015

Member

UP/AMP is ok. Yes, it's for asymmetric multiprocessing.

csr_map = {
"kernel_cpu": 14
}
csr_map.update(_QcAdapterBase.csr_map)

def __init__(self, platform, *args, **kwargs):
_QcAdapterBase.__init__(self, platform, **kwargs)

self.submodules.kernel_cpu = amp.KernelCPU(
platform, self.sdram.crossbar.get_master())
self.submodules.mailbox = amp.Mailbox()
self.add_wb_slave(mem_decoder(0xd0000000), self.mailbox.i1)
self.kernel_cpu.add_wb_slave(mem_decoder(0xd0000000), self.mailbox.i2)

rtio_csrs = self.rtio.get_csrs()
self.submodules.rtiowb = wbgen.Bank(rtio_csrs)
self.kernel_cpu.add_wb_slave(mem_decoder(0xa0000000), self.rtiowb.bus)
self.add_csr_region("rtio", 0xa0000000, 32, rtio_csrs)

self.kernel_cpu.add_wb_slave(mem_decoder(0xb0000000), self.dds.bus)


default_subtarget = Single

0 comments on commit ef375b5

Please sign in to comment.