aboutsummaryrefslogtreecommitdiff
path: root/src/cpu (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-06-20perf(cpu): speed up event systemUri Shaked1-25/+47
Use a linked list instead of array. This makes the simulator runs almost twice as fast in case of timers with prescaler of 1, e.g. when using the TVout library. In addition, we use a pool of clock event objects to avoid expensive GCs.
2021-02-19feat(usart): implement RX #11Uri Shaked1-1/+2
close #11
2020-12-12perf(cpu): speed up event systemUri Shaked2-18/+59
ditch `array.sort()` and instead manually keep the array sorted when we insert a new item.
2020-12-12test(cpu): fix implicit any errorUri Shaked1-3/+5
2020-12-12fix(cpu): event system issueUri Shaked2-2/+63
`updateClockEvent()` and `clearClockEvent()` would sometimes mess up the list of events. This could cause unexpected behavior when you have multiple timers running. Also added regression tests for these methods.
2020-12-09perf!: centeral timekeepingUri Shaked1-1/+44
This should improve performance, especially when running simulations with multiple peripherals. For instance, the demo project now runs at ~322%, up from ~185% in AVR8js 0.13.1. BREAKING CHANGE: `tick()` methods were removed from individual peripherals. You now need to call `cpu.tick()` instead.
2020-12-09refactor: central interrupt handling #38Uri Shaked1-3/+76
2020-12-09test(cpu): improve test nameUri Shaked1-1/+1
2020-09-30fix(cpu): incorrect address for RAMPZ / EINDUri Shaked2-8/+8
We used their I/O space address intead of their data space address. close #61
2020-09-02fix(interrupt): broken on ATmega2560Uri Shaked2-1/+23
close #58
2020-09-02fix(instruction): EICALL is brokenUri Shaked2-1/+3
close #59
2020-06-04test(instruction): extract constantsUri Shaked1-238/+274
This makes the test code easier to follow
2020-05-25feat(timer): Compare Match Output (#45)Uri Shaked1-0/+4
The Compare Match Output bits are used to generate hardware PWM signals on selected MCU pins. This is also the mechanism used by Arduino's analogWrite() method. See #32 for more details
2020-04-29fix(timer): Reading TCNT in 2-cycle instructionsUri Shaked1-12/+12
close #40
2020-04-28fix(timer): incorrect high counter byte behaviorUri Shaked1-0/+8
According to the datasheet, the value of the high byte of the counter for 16-bit timers (such as timer 1) is only updated when the low byte is being read/written. close #37
2020-04-28fix(instruction): LD, ST instructions should take 2 clock cyclesUri Shaked2-20/+33
close #39
2020-04-09feat(instruction): 22-bit PC support #31Uri Shaked3-20/+119
adapt CALL, ICALL, RCALL, RET, and RETI for MCUs with 22-bit PC
2020-04-09feat(instruction): implement EICALL, EIJMP #31Uri Shaked2-0/+38
2020-04-08feat(instruction): implement ELPM #31Uri Shaked2-0/+71
2020-04-02test(instruction): use assembly in testsUri Shaked1-89/+91
Refactored the tests to use AVR assembly instead of hardcoded bytecode. This change should make the tests much easier to read and maintain. Before: loadProgram('659a'); Now: loadProgram('SBI 0x0c, 5');
2020-03-22refactor: added peripherals and cpu feature folderslironh6-0/+1687