Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fb9195526009
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c6d375007615
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Apr 3, 2015

  1. kc705: 16 TTLs

    sbourdeauducq committed Apr 3, 2015
    Copy the full SHA
    5f7161a View commit details
  2. Copy the full SHA
    c6d3750 View commit details
Showing with 73 additions and 5 deletions.
  1. +1 −1 artiq/gateware/amp/kernel_cpu.py
  2. +1 −1 soc/runtime/Makefile
  3. +67 −0 soc/runtime/linker.ld
  4. +3 −2 soc/runtime/main.c
  5. +1 −1 soc/targets/artiq_kc705.py
2 changes: 1 addition & 1 deletion artiq/gateware/amp/kernel_cpu.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@

class KernelCPU(Module):
def __init__(self, platform, lasmim,
exec_address=0x41000000,
exec_address=0x40020000,
main_mem_origin=0x40000000,
l2_size=8192):
self._reset = CSRStorage(reset=1)
2 changes: 1 addition & 1 deletion soc/runtime/Makefile
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ runtime.elf: $(OBJECTS) libs

%.elf:
$(LD) $(LDFLAGS) \
-T $(MSCDIR)/software/libbase/linker-sdram.ld \
-T linker.ld \
-N -o $@ \
$(MSCDIR)/software/libbase/crt0-$(CPU).o \
$(OBJECTS) \
67 changes: 67 additions & 0 deletions soc/runtime/linker.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
INCLUDE generated/output_format.ld
ENTRY(_start)

INCLUDE generated/regions.ld

/* Assume ORIGIN(main_ram) = 0x40000000. Unfortunately,
* ld does not allow this expression here.
*/
MEMORY {
runtime : ORIGIN = 0x40000000, LENGTH = 0x20000 /* 128K */
}

/* Kernel memory space start right after the runtime,
* and ends before the runtime stack.
*/
PROVIDE(_kmem = 0x40020000);

/* Runtime stack is always at the end of main_ram.
* This stack is shared with the kernel on uniprocessor systems.
*/
PROVIDE(_fstack = 0x40000000 + LENGTH(main_ram) - 4);

SECTIONS
{
.text :
{
_ftext = .;
*(.text .stub .text.* .gnu.linkonce.t.*)
_etext = .;
} > runtime

.rodata :
{
. = ALIGN(4);
_frodata = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1)
_erodata = .;
} > runtime

.data :
{
. = ALIGN(4);
_fdata = .;
*(.data .data.* .gnu.linkonce.d.*)
*(.data1)
_gp = ALIGN(16);
*(.sdata .sdata.* .gnu.linkonce.s.*)
_edata = .;
} > runtime

.bss :
{
. = ALIGN(4);
_fbss = .;
*(.dynsbss)
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
. = ALIGN(8);
_heapstart = .;
} > runtime
}
5 changes: 3 additions & 2 deletions soc/runtime/main.c
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@
#include "rtio.h"
#include "dds.h"

static unsigned char kcode[256*1024];

static struct symbol symtab[128];
static int _symtab_count;
@@ -57,12 +56,14 @@ static int symtab_add(const char *name, void *target)
return 1;
}

extern int _kmem;

static int load_object(void *buffer, int length)
{
symtab_init();
return load_elf(
resolve_service_symbol, symtab_add,
buffer, length, kcode, sizeof(kcode));
buffer, length, &_kmem, 2*1024*1024);
}

typedef void (*kernel_function)(void);
2 changes: 1 addition & 1 deletion soc/targets/artiq_kc705.py
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ def __init__(self, platform, cpu_type="or1k", **kwargs):
platform.request("ttl_h_tx_en").eq(1)
]
rtio_ins = [platform.request("pmt") for i in range(2)]
rtio_outs = [platform.request("ttl", i) for i in range(6)] + [fud]
rtio_outs = [platform.request("ttl", i) for i in range(16)] + [fud]

self.submodules.rtiocrg = _RTIOCRG(platform, self.crg.pll_sys)
self.submodules.rtiophy = rtio.phy.SimplePHY(