Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usability enhancements #345

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e69ec33
add editable memory/register prototype and scroll to executed line
cayb0rg Nov 12, 2023
81f66c1
Updates code editor with changes to memory and widens datapath lines
cayb0rg Dec 27, 2023
569c565
Merge into async-emulator-core
cayb0rg Jan 12, 2024
1addaa0
Prohibit edit operations beyond current line numbers and add ability …
cayb0rg Jan 14, 2024
d1f5d6d
start adding hex-editor selection
cayb0rg Jan 15, 2024
7413da2
Adds text segment viewer and updates interface styles
cayb0rg Jan 19, 2024
cdc2513
Add data segment viewer
cayb0rg Jan 19, 2024
005fca5
Highlights executed line in text segment viewer
cayb0rg Jan 19, 2024
19a20c9
Merge async-emulator-core
cayb0rg Jan 19, 2024
e3a5ab1
blep
cayb0rg Jan 19, 2024
4f9fa19
Merge async-emulator-core
cayb0rg Jan 19, 2024
50d8fd1
Move SwimEditor component into its own module
cayb0rg Feb 1, 2024
0b15f91
Adds cross references, converts curr_line variables to use state
cayb0rg Feb 3, 2024
a498a1c
replace text_model with use_state_eq
cayb0rg Feb 4, 2024
c582409
Merge improved-datapath-trait into usability-enhancements
cayb0rg Feb 4, 2024
e65efd6
re-add force update for datapath
cayb0rg Feb 4, 2024
539903a
Add hex highlighting and switch tabs on cross reference click
cayb0rg Feb 4, 2024
d206069
Additional polish to the hex editor and segment views
cayb0rg Feb 5, 2024
299818d
Start console i/o UI
cayb0rg Feb 5, 2024
6fcf40a
Merge into improved-datapath-trait
cayb0rg Feb 9, 2024
9ae036d
Update Register View to use DatapathCommunicator
cayb0rg Feb 9, 2024
33e0f18
remove regrowprops
cayb0rg Feb 9, 2024
0c85693
Start using communicator to update memory
cayb0rg Feb 9, 2024
747ee8a
Add input fields to all register types
cayb0rg Feb 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ js-sys = "0.3.61"
monaco = { git = "https://github.com/SWIM-ucf/rust-monaco", rev = "c9586e4af77131a15daf53e91e1ad5161a5265e8", features = ["yew-components"] }
wasm-bindgen = "0.2.83"
wasm-bindgen-futures = "0.4.33"
web-sys = {version = "0.3.60", features = ["CssStyleDeclaration", "Event", "HtmlCollection", "HtmlElement", "HtmlInputElement", "HtmlObjectElement", "SvgElement"]}
web-sys = {version = "0.3.60", features = ["CssStyleDeclaration", "Event", "HtmlCollection", "HtmlElement", "HtmlInputElement", "HtmlObjectElement", "SvgElement", "CanvasRenderingContext2d", "Document", "HtmlCanvasElement", "EventTarget", "InputEvent", "ScrollLogicalPosition", "ScrollIntoViewOptions"]}
yew = {version = "0.20.0", features = ["csr"] }
yew-hooks = "0.2.0"
yew-agent = "0.3.0"
Expand All @@ -31,4 +31,10 @@ futures = "0.3.29"
levenshtein = "1.0.5"

# Tests
akin = "0.4"
akin = "0.4"

# Logging
cfg-if = "0.1"
log = "0.4"
console_log = { version = "1", features = ["color"] }
humantime = "2.1.0"
8 changes: 5 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@

<!-- Font for icons used by monaco (codicons) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/codicon.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="static/styles/reset.css"/>
<link rel="stylesheet" href="static/styles/main.css"/>
<link rel="stylesheet" href="static/styles/tabs.css"/>
<link rel="stylesheet" href="static/styles/visual_datapath.css">


<link data-trunk rel="tailwind-css" href="static/styles/tailwind.css" />

<title>SWIM</title>
</head>
<body></body>
Expand Down
6 changes: 5 additions & 1 deletion src/agent/datapath_communicator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl DatapathCommunicator {

/// Copies the contents of `data` to the emulator core's memory at `ptr`. Copies until either the end of `data` or
/// the end of the emulaot core's memory.
pub fn set_memory(&self, ptr: usize, data: Vec<u8>) {
pub fn set_memory(&self, ptr: u64, data: u32) {
self.send_message(Command::SetMemory(ptr, data));
}

Expand Down Expand Up @@ -137,4 +137,8 @@ impl DatapathCommunicator {
pub fn reset(&self) {
self.send_message(Command::Reset);
}

pub fn get_accepting_input(&self) -> bool {
todo!()
}
}
2 changes: 1 addition & 1 deletion src/agent/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub enum Command {
Initialize(usize, Vec<u8>),
SetExecuteSpeed(u32),
SetRegister(String, u64),
SetMemory(usize, Vec<u8>),
SetMemory(u64, u32),
Execute,
ExecuteInstruction,
ExecuteStage,
Expand Down
Loading
Loading