aboutsummaryrefslogtreecommitdiff
path: root/src/cpu (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-02-11chore(deps): upgrade prettierUri Shaked2-5/+8
reformat all code with the new prettier version
2025-02-11test: migrate tests from jest to vitestUri Shaked3-1/+4
2023-01-05chore(deps): upgrade typescript, jest, eslintUri Shaked1-3/+3
also upgrade related dependencies: ts-node, ts-jest
2022-04-30fix(cpu): don't clear RAM on reset #107Uri Shaked1-1/+0
wokwi/wokwi-features#282
2022-02-07style(instruction.spec): add comments for missing instruction tests and ↵Dudeplayz1-33/+103
reorder tests according to the AVR datasheet
2022-02-07test(instruction): add ADD, SUB and WDR unit testsDudeplayz1-0/+54
2022-01-20perf(cpu): speed up interruptsUri Shaked1-11/+28
code which makes heavy use of interrupts considerably slows down the simulator. E.g. that transmit programs large amount of data over SPI. See wokwi/wokwi-features#280 for an example.
2021-10-24fix(eeprom): EEPROM interrupt not firing #110Uri Shaked1-2/+3
fix #110
2021-09-10refactor: remove the ICPU interfaceUri Shaked3-33/+18
Removing the interface simplifies the code
2021-09-10feat(watchdog): implement watchdog timer #106Uri Shaked2-1/+12
2021-09-07fix(gpio): CBI/SBI handling in writes to PIN register #103Uri Shaked2-6/+8
fix #103
2021-08-15feat(timer): external timer support #97Uri Shaked1-2/+1
also refactor timer/GPIO interaction to be more generic. close #97
2021-07-07feat(gpio): external interrupt/PCINT support (#82)Uri Shaked1-0/+2
close #70, #84
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