Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 4 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
View
2  milkymist/dvisampler/chansync.py
@@ -21,6 +21,7 @@ def __init__(self, width, depth):
self.specials += storage
wrport = storage.get_port(write_capable=True)
+ self.specials += wrport
self.comb += [
wrport.adr.eq(produce),
wrport.dat_w.eq(self.din),
@@ -29,6 +30,7 @@ def __init__(self, width, depth):
self.sync += _inc(produce, depth)
rdport = storage.get_port(async_read=True)
+ self.specials += rdport
self.comb += [
rdport.adr.eq(consume),
self.dout.eq(rdport.dat_r)
View
1  milkymist/dvisampler/edid.py
@@ -89,6 +89,7 @@ def __init__(self, pads, default=_default_edid):
)
]
rdport = self.mem.get_port()
+ self.specials += rdport
self.comb += rdport.adr.eq(offset_counter)
data_bit = Signal()
View
3  software/bios/Makefile
@@ -15,7 +15,6 @@ all: bios.bin
$(M2DIR)/tools/mkmmimg $@ write
bios.elf: linker.ld $(OBJECTS) libs
-bios-rescue.elf: linker-rescue.ld $(OBJECTS) libs
%.elf:
$(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) \
@@ -43,6 +42,6 @@ flash: bios.bin
m1nor bios.bin
clean:
- $(RM) $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin bios-rescue.elf bios-rescue.bin .*~ *~
+ $(RM) $(OBJECTS) $(OBJECTS:.o=.d) bios.elf bios.bin .*~ *~
.PHONY: all main.o clean libs flash
View
2  software/bios/boot-helper.S
@@ -7,4 +7,4 @@ boot_helper:
nop
nop
nop
- call r5
+ call r4
View
18 software/bios/boot.c
@@ -14,16 +14,15 @@
#include <net/tftp.h>
#include "boot.h"
-extern int rescue;
-extern void boot_helper(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int r4, unsigned int addr);
+extern void boot_helper(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int addr);
-static void __attribute__((noreturn)) boot(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int r4, unsigned int addr)
+static void __attribute__((noreturn)) boot(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int addr)
{
printf("Executing booted program.\n");
uart_sync();
irq_setmask(0);
irq_setie(0);
- boot_helper(r1, r2, r3, r4, addr);
+ boot_helper(r1, r2, r3, addr);
while(1);
}
@@ -137,7 +136,7 @@ void serialboot(void)
|((unsigned int)frame.payload[2] << 8)
|((unsigned int)frame.payload[3] << 0);
uart_write(SFL_ACK_SUCCESS);
- boot(cmdline_adr, initrdstart_adr, initrdend_adr, rescue, addr);
+ boot(cmdline_adr, initrdstart_adr, initrdend_adr, addr);
break;
}
case SFL_CMD_CMDLINE:
@@ -234,7 +233,7 @@ void netboot(void)
} else
initrdend_adr = initrdstart_adr + size;
- boot(cmdline_adr, initrdstart_adr, initrdend_adr, rescue, SDRAM_BASE);
+ boot(cmdline_adr, initrdstart_adr, initrdend_adr, SDRAM_BASE);
}
void flashboot(void)
@@ -245,10 +244,7 @@ void flashboot(void)
unsigned int got_crc;
printf("Booting from flash...\n");
- if(rescue)
- flashbase = (unsigned int *)FLASH_OFFSET_RESCUE_APP;
- else
- flashbase = (unsigned int *)FLASH_OFFSET_REGULAR_APP;
+ flashbase = (unsigned int *)FLASH_OFFSET_REGULAR_APP;
length = *flashbase++;
crc = *flashbase++;
if((length < 32) || (length > 4*1024*1024)) {
@@ -263,5 +259,5 @@ void flashboot(void)
printf("CRC failed (expected %08x, got %08x)\n", crc, got_crc);
return;
}
- boot(0, 0, 0, rescue, SDRAM_BASE);
+ boot(0, 0, 0, SDRAM_BASE);
}
View
10 software/bios/linker.ld
@@ -4,8 +4,8 @@ ENTRY(_start)
__DYNAMIC = 0;
MEMORY {
- flash : ORIGIN = 0x00860000, LENGTH = 0x20000 /* 128K */
- sram : ORIGIN = 0x10000000, LENGTH = 0x01000 /* 4K */
+ rom : ORIGIN = 0x00860000, LENGTH = 0x20000 /* 128K */
+ sram : ORIGIN = 0x10000000, LENGTH = 0x01000 /* 4K */
}
SECTIONS
@@ -15,7 +15,7 @@ SECTIONS
_ftext = .;
*(.text .stub .text.* .gnu.linkonce.t.*)
_etext = .;
- } > flash
+ } > rom
.rodata :
{
@@ -24,7 +24,7 @@ SECTIONS
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1)
_erodata = .;
- } > flash
+ } > rom
/* We shouldn't have a .data section, but the GNU crapchain whines if we don't */
.data :
@@ -36,7 +36,7 @@ SECTIONS
_gp = ALIGN(16);
*(.sdata .sdata.* .gnu.linkonce.s.*)
_edata = .;
- } > flash
+ } > rom
.bss :
{
View
19 software/bios/main.c
@@ -375,7 +375,6 @@ static void do_command(char *c)
printf("Command not found\n");
}
-int rescue;
extern unsigned int _edata;
static void crcbios(void)
@@ -391,7 +390,7 @@ static void crcbios(void)
* We also use the address of _edata to know the length
* of our code.
*/
- offset_bios = rescue ? FLASH_OFFSET_RESCUE_BIOS : FLASH_OFFSET_REGULAR_BIOS;
+ offset_bios = FLASH_OFFSET_REGULAR_BIOS;
expected_crc = _edata;
length = (unsigned int)&_edata - offset_bios;
actual_crc = crc32((unsigned char *)offset_bios, length);
@@ -488,15 +487,9 @@ static int test_user_abort(void)
static void boot_sequence(void)
{
if(test_user_abort()) {
- if(rescue) {
- serialboot();
- netboot();
- flashboot();
- } else {
- flashboot();
- serialboot();
- netboot();
- }
+ flashboot();
+ serialboot();
+ netboot();
printf("No boot medium found\n");
}
}
@@ -506,15 +499,11 @@ int main(int i, char **c)
char buffer[64];
int ddr_ok;
- rescue = !((unsigned int)main > FLASH_OFFSET_REGULAR_BIOS);
-
irq_setmask(0);
irq_setie(1);
uart_init();
puts(banner);
crcbios();
- if(rescue)
- printf("Rescue mode\n");
id_print();
ethreset();
print_mac();
View
2  software/videomixer/dvisamplerX.c
@@ -167,7 +167,7 @@ void dvisamplerX_service(void)
if(dvisamplerX_locked) {
if(dvisamplerX_clocking_locked_read()) {
- if(elapsed(&dvisamplerX_last_event, identifier_frequency_read())) {
+ if(elapsed(&dvisamplerX_last_event, identifier_frequency_read()/2)) {
dvisamplerX_adjust_phase();
dvisamplerX_print_status();
}
View
4 top.py
@@ -86,8 +86,8 @@ class SoC(Module):
"uart": 0,
"timer0": 1,
"minimac": 2,
- "dvisampler0": 3,
- "dvisampler1": 4,
+ "dvisampler0": 3,
+ "dvisampler1": 4,
}
def __init__(self, platform):

No commit comments for this range

Something went wrong with that request. Please try again.