Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
Commits on Jul 03, 2011
@sbourdeauducq sbourdeauducq gdbstub: disable break on entering debug ROM 86601af
Commits on Jul 10, 2011
@sbourdeauducq sbourdeauducq Update README c9a2887
@sbourdeauducq sbourdeauducq Update headers 446a023
@sbourdeauducq sbourdeauducq Bump version number 2a9a0e3
@sbourdeauducq sbourdeauducq fmlmeter: add memory address capture support cb312e3
Commits on Jul 11, 2011
@sbourdeauducq sbourdeauducq Enable ISE 13.2 BRAM silicon bug workaround (Xilinx AR 39999) 13a368c
@sbourdeauducq sbourdeauducq Out of order memory controller model ed576c0
@sbourdeauducq sbourdeauducq Model parameters 3f5163c
@sbourdeauducq sbourdeauducq hpdmc: peak performance test d09f6ca
@sbourdeauducq sbourdeauducq fmlmeter: record write bit 7330f84
@sbourdeauducq sbourdeauducq Display memory read/write stats 7dda0b9
Commits on Jul 13, 2011
@sbourdeauducq sbourdeauducq FML: early ack 8cfa0da
Commits on Jul 18, 2011
@sbourdeauducq sbourdeauducq TMU prefetch (WIP): tag memory (untested) cfaf399
Commits on Jul 20, 2011
@sbourdeauducq sbourdeauducq TMU prefetch (WIP): split tag memory results between fragment FIFO an…
…d fetch unit
@sbourdeauducq sbourdeauducq TMU: buffer: arbitrary depth de40a86
@sbourdeauducq sbourdeauducq TMU prefetch: use miss mask c63ee15
@sbourdeauducq sbourdeauducq TMU prefetch: remove useless buffers 91cd851
@sbourdeauducq sbourdeauducq TMU prefetch: serialize simultaneous texel cache misses 40a2656
@mwalle mwalle lm32: sync to upstream v3.6 sources
 - feature: support for dynamically switching EBA to DEBA via a GPIO.
 - bug: EA now reports instruction that caused the data abort, rather than
   next instruction.
@mwalle mwalle lm32: new license headers for lm32 source files
These headers were introduced with LatticeMico System 1.3.
@mwalle mwalle lm32: update changelog 552fc7b
@mwalle mwalle Update Lattice License Agreement 31d8a86
Commits on Jul 21, 2011
@sbourdeauducq sbourdeauducq TMU prefetch: texel fetch 5bfeabb
@sbourdeauducq sbourdeauducq TMU prefetch: configurable memory data FIFO depth 156c0ca
@sbourdeauducq sbourdeauducq TMU prefetch: top level design 8c17500
Commits on Jul 24, 2011
@sbourdeauducq sbourdeauducq TMU prefetch: true dual port RAM module d7b6428
@sbourdeauducq sbourdeauducq TMU prefetch: quad port RAM module 926a3bd
@sbourdeauducq sbourdeauducq TMU prefetch: cache data memory. Prefetch complete but untested. 70d9ba9
@sbourdeauducq sbourdeauducq TMU prefetch: fixed compilation errors 44b92e5
@sbourdeauducq sbourdeauducq TMU: check fdest cache valid bit 373917a
@sbourdeauducq sbourdeauducq TMU: check for address generator busy a4e66b5
@sbourdeauducq sbourdeauducq TMU prefetch: fix Xst warnings 3ad5eb9
Commits on Jul 25, 2011
@sbourdeauducq sbourdeauducq TMU: get simulation to run f2ff607
@sbourdeauducq sbourdeauducq TMU prefetch: fix qpram module f88e7e5
@sbourdeauducq sbourdeauducq TMU prefetch: ack fragment FIFO on datamem resume df38f91
@sbourdeauducq sbourdeauducq TMU prefetch: generate datamem busy signal 79679fb
@sbourdeauducq sbourdeauducq TMU prefetch: fix split module 09d45f6
@sbourdeauducq sbourdeauducq TMU prefetch: assert busy during memory burst in texel fetch unit 7be5065
@sbourdeauducq sbourdeauducq tmubench: send data to UART only 64ec831
@sbourdeauducq sbourdeauducq TMU: make fragment, fetch and commit FIFO sizes configurable at top l…
@sbourdeauducq sbourdeauducq renderer: enlarge texture buffers 4939ee3
Commits on Jul 26, 2011
@sbourdeauducq sbourdeauducq TMU prefetch: flush cache 7abd367
@sbourdeauducq sbourdeauducq TMU prefetch: fix commit FIFO write indexing df573f9
@sbourdeauducq sbourdeauducq TMU prefetch: faster commit c219760
@sbourdeauducq sbourdeauducq TMU prefetch: even faster commit 639f124
@sbourdeauducq sbourdeauducq TMU prefetch: fix qpram read-after-write 2c430c9
@sbourdeauducq sbourdeauducq TMU prefetch: fix pipe ack generation in tagmem 9a06b83
@sbourdeauducq sbourdeauducq TMU: testbench: display mask on bus writes c43799e
Commits on Jul 27, 2011
@sbourdeauducq sbourdeauducq demo: cleanup output 72a4243
Commits on Aug 02, 2011
@mwalle mwalle lm32: gdbstub save and restore IE/IM/IP
This fixes issue #27.
@sbourdeauducq sbourdeauducq Update debug ROM e6000e3
Commits on Aug 14, 2011
@mwalle mwalle gdbstub: cosmetic cleanups 8682817
Commits on Aug 24, 2011
Xiangfu Liu tools: flterm: add log 10b1a33
@sbourdeauducq sbourdeauducq flterm: cosmetic changes + bump version number 2353955
Commits on Aug 25, 2011
Xiangfu Liu tools: flterm: check logfd, check ascii, flush each line 9aa4a60
Commits on Aug 26, 2011
Xiangfu Liu flterm: add check if c is 0x00 3ccb7ef
Commits on Sep 13, 2011
@mwalle mwalle uart: add status and control register 58cf888
@mwalle mwalle update header files for new uart core c475927
@mwalle mwalle libhpdmc: support new uart core 2b05b36
@mwalle mwalle gdbstub: support new uart core 8255baf
@mwalle mwalle monitor: update gdbstub rom 8694f47
@mwalle mwalle bios/demo: support new uart core 25c54ad
@mwalle mwalle reassign interrupts
Remove 'holes' from the interrupt map.
Commits on Oct 01, 2011
@sbourdeauducq sbourdeauducq libbase: add abort() 7414dca
@sbourdeauducq sbourdeauducq fpvm: new scheduler from Werner (NEEDS REPLACEMENT OF alloca()) 0c4c26d
Commits on Oct 03, 2011
@wpwrak wpwrak lnfpus.c: replaced calloc with stack-based allocation 00237e5
@wpwrak wpwrak lnfpus.c: made thread-safe by removing global variable "sc" 2c00c05
Commits on Nov 10, 2011
@sbourdeauducq sbourdeauducq gdbstub: fix off-by-one error (Michael Walle) 8c9a376
@sbourdeauducq sbourdeauducq Update gdbstub rom adc92ab
Commits on Nov 12, 2011
@sbourdeauducq sbourdeauducq Drive PHY reset when Ethernet is disabled 981c25f
@sbourdeauducq sbourdeauducq BIOS: sanitize exception vectors 4def59a
@sbourdeauducq sbourdeauducq Generate bus errors on the first 512KB to catch NULL pointers 02c81d5
Commits on Nov 13, 2011
@wpwrak wpwrak softusb-input: also accept 3 byte reports, e.g., from wheelless mice 6b83fa4
@wpwrak wpwrak softusb-input: use symbolic constants for packet ID values 85b2d1c
@wpwrak wpwrak softusb: use macro to construct (address, EP) value
0x81 meaning "address 1, endpoint 1" looks like the ubiquitous 0x81
meaning "direction IN, endpoint 1". This patch makes things a little
less misleading.
@wpwrak wpwrak softusb: don't interrupt the host if we're ignoring the packet anyway 40404f9
@wpwrak wpwrak softusb: renamed "fs" to "full_speed"
No need to be *that* tight-lipped ...
@wpwrak wpwrak softusb: separate EP-specific state from port-specific state
This is made a little easier by the rest of the code ignoring the
data toggle in SETUP requests. Otherwise, EP0 would need some state
as well.
@wpwrak wpwrak softusb: support composite USB devices
For this, we parse the entire configuration descriptor and look at
all interface descriptors. Furthermore, we set the endpoint number
according to the endpoint descriptor(s) following the interface
descriptor, instead of hard-coding it.

Here is a brief description of how composite devices are structured:

Note that this doesn't help with combi-devices that present
themselves as independent devices plus a hub.

We still bail out at the first interface descriptor we don't
understand, to avoid wandering into crazy things that may be lurking
at tne end of the configuration descriptor. (I did this on a whim.
Maybe we don't need that extra dose of paranoia.)
@wpwrak wpwrak softusb: added hack for Rii RF mini-keyboard
Unlike the ACME rodent, the mouse pad of the Rii RF mini-keyboard
sends reports with report ID and 16 bit resolution. This patch just
identifies these reports by their sheer size and then rearranges the
packet content before further processing.
@sbourdeauducq sbourdeauducq tools: allow overriding the C compiler for distributions like Fedora …
…who can't package clang correctly
@sbourdeauducq sbourdeauducq tools: use the CC variable b5cbe7a
Commits on Nov 14, 2011
@sbourdeauducq sbourdeauducq USB: try enumerating full speed devices 0d3a651
@sbourdeauducq sbourdeauducq USB: retry address setting fe5b41e
@sbourdeauducq sbourdeauducq USB: generate SOFs 99b5926
@sbourdeauducq sbourdeauducq USB: shorter timeouts, fewer retries bd3ddb7
Commits on Nov 15, 2011
@sbourdeauducq sbourdeauducq softusb: increase program memory size to 8K 305d145
@wpwrak wpwrak softusb: remove compiler warning about unused variable 0decd11
@wpwrak wpwrak softusb: implement the reset recovery interval
Sections and of the USB 2.0 spec say the a host has
to wait for at least 10 ms (Trstrcy) after reset before it can expect
a device to be able to receive data.

In Linux drivers/usb/core/hub.c:hub_port_reset we find this:

	/* TRSTRCY = 10 ms; plus some extra */
	msleep(10 + 40);

So let's use 50 ms.
@sbourdeauducq sbourdeauducq USB: send SOFs and keepalives on both ports and immediately after reset f6c7474
Commits on Nov 19, 2011
@wpwrak wpwrak softusb: 4 kB hack f1c0fe7
@wpwrak wpwrak softusb: use OE# of port A for trigger c8111e5
@wpwrak wpwrak softusb: send SETUP and DATA0 back-to-back edf599e
@wpwrak wpwrak softusb: simplify and correct data toggle in control transactions
This patch does three things:

1) it replaces get_data_token with a simpler and more efficient
   version that doesn't unconditionally toggle

2) it only toggles the transmitter-side sequence if the DATAx
   packet is acknowledged (USB 1.1 sec 8.6 pg 168 and USB 2.0
   sec 8.6 pg 232)

3) it always sends DATA1 in the status stage, in accordance with
   USB 1.1 sec 8.5.2 pg 165 and USB 2.0 sec 8.5.3 pg 226.

In testing, this patch reduced the probability of the low-speed device
used (the Rii RF keyboard) registering. This seems to simply be the
effect of bugs eliminated in later patches having a greater effect,
and does not constitute a regression of code correctness.
@wpwrak wpwrak softusb: in SETUP, only use IN data with the right sequence bit
This also removes the functional regression of the previous commit.
@wpwrak wpwrak softusb: use toggle() also for bulk/interrupt 7c9748b
@wpwrak wpwrak softusb: swap in_reply and out_reply 9a26965
@wpwrak wpwrak softusb: move all IN transfers to function usb_in
Besides reducing some redundancy, this patch also makes the following

- retry on timeout (e.g., if the DATAx packet was garbled) in the data
  stage of control transfers instead of failing the entire transfer

- retry IN tranfers in the status stage

- reject IN transfers in the status stage if they have the wrong
  sequence bit (more USB 1.1 sec 8.5.2 and USB 2.0 sec 8.5.3)

- slightly reduce the information in debugging output since control
  and bulk/interrupt now use the same code path for IN transfers

The streamlined code path also makes full-speed work occasionally.
@wpwrak wpwrak softusb: move all OUT transfers to function usb_out
This is mainly cosmetic, to reduce the amount of code. It adds
retry on timeout, though.

Again, as a side-effect, debug messages become a bit less detailed.
@wpwrak wpwrak suftusb: remove one now unused debug message 309d30d
@sbourdeauducq sbourdeauducq Revert 4KB hack 6e8c7b1
@wpwrak wpwrak softusb: partially unroll usb_in
This patch partially unrolls usb_in and takes decisions on the further
disposition of a packet at early as possible. The objective is to
minimize the processing needed between EOP of the DATAx packet and the
sending of an ACK.

The patch also changes error handling in two ways:

1) when deciding to discard a packet, always wait until the device
   really stops sending

2) packets with a garbled PID are treated as non-fatal errors
@wpwrak wpwrak softusb: send ACKs from dedicated inline function
To accelerate sending ACKs, this patch avoids the call setup overhead
of usb_tx and introduces a dedicated inline function. In experiments,
this reduced EOP-to-ACK time by about 10 full-speed bit times.
@wpwrak wpwrak softusb: fail garbled packets fatally again
As the result of more testing that showed no degradation in performance,
this reverts to the original logic of failing garbled packets harder.
@wpwrak wpwrak softusb: convert last remaining use of usb_rx to usb_rx_ack
Since usb_rx is now only used to receive ACK/NAK, we can replace it
with a more streamlined version. This should also marginally improve
error handling.
@wpwrak wpwrak softusb: clear EPs on disconnect
Along with the logic to handle multiple interfaces, commit
a26dc51 also introduced the following

When a keyboard or composite device with keyboard was replaced by a
mouse after enumeration, the stack would still poll the "keyboard",
which most likely resulted in the mouse data to be b drained and

This patch clears the EP roles on disconnect.
@sbourdeauducq sbourdeauducq softusb: update copyright notice 3a7e212
Commits on Nov 21, 2011
@mwalle mwalle flterm: make kernel image optional
This way flterm can be used as a 'normal' terminal emulator.
@sbourdeauducq sbourdeauducq flterm: bump version number and fix print_usage output 327bdc7
@mwalle mwalle bios: fix initrd end pointer
initrd_end points just past the last byte of the initrd. This way initramfs
images works.
Commits on Nov 22, 2011
Xiangfu Liu connect the dependency between softusb and libhal, add libs dependenc…
…y to bios

Signed-off-by: Xiangfu Liu <>
@sbourdeauducq sbourdeauducq Cleanup BIOS makefile 1ee812a
@mwalle mwalle sysctl: change offsets and new frequency register
Reorganize register offsets and introduce new register to read the system
clock frequency.
@mwalle mwalle sysctl: new debug control register
Introduce a debug control register. It can be used to lock the gdbstub ROM
and enable/disable bus errors. The gdbstub ROM will be read/writeable until
one writes the corresponding lock bit to this register. This will ease
future gdbstub updates.
@mwalle mwalle monitor: introduce write lock
Make ROM writeable unless the lock is set.
@mwalle mwalle soc: connect write lock register to monitor core d0a720b
@mwalle mwalle gdbstub: set correct uart speed
Set the UART speed to a fixed value when gdbstub is called and restore its
previous value if gdbstub exits.
@mwalle mwalle update monitor rom 173f00d
@mwalle mwalle bios: lock gdbstub ROM
For now, unconditionally lock the GDB stub ROM as soon as possible.
@mwalle mwalle gdbstub: disable bus errors
Disable bus errors while the gdbstub is running. This will prevent nested
gdbstub invokations.
@mwalle mwalle soc: add enable signal to bus errors 327d65c
@mwalle mwalle bios: enable bus errors
By default bus errors are disabled, enable them.
@sbourdeauducq sbourdeauducq sysctl: fix ICAP address decoding 0f65527
@sbourdeauducq sbourdeauducq software: remove redundant clk_frequency 028c9f6
Commits on Nov 23, 2011
@sbourdeauducq sbourdeauducq Fix assignment to bus_errors_en 4c22685
@sbourdeauducq sbourdeauducq softusb: new DPLL 81eddbd
Commits on Nov 24, 2011
@sbourdeauducq sbourdeauducq fpvm: new fpvm_set_bind_callback API 4c7e4c9
@sbourdeauducq sbourdeauducq Update copyright notices 60b370e
@sbourdeauducq sbourdeauducq fpvm: accessor functions 50436b5
@sbourdeauducq sbourdeauducq fpvm: support source-only binding 0aeb5c1
Commits on Nov 27, 2011
@kristianpaul Ignore log files in git cc06e1e
@kristianpaul Merge branch 'master' into gps-sdr-testing
Solved conflict around: