From bb46561619b241e17a415a48ed3e0624f4af399d Mon Sep 17 00:00:00 2001 From: James Hughes Date: Mon, 24 Mar 2025 12:42:12 -0300 Subject: [PATCH 1/4] make page: --- site/index.rst | 1 + site/labs/programming/programming.rst | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 site/labs/programming/programming.rst diff --git a/site/index.rst b/site/index.rst index 7e0aaee5..4cda4b47 100644 --- a/site/index.rst +++ b/site/index.rst @@ -105,6 +105,7 @@ Office Hours labs/comparisons/comparisons labs/decoding-instructions/decoding-instructions labs/decoding-instructions/decoding-instructions-registers + labs/programming/programming diff --git a/site/labs/programming/programming.rst b/site/labs/programming/programming.rst new file mode 100644 index 00000000..27ef25c7 --- /dev/null +++ b/site/labs/programming/programming.rst @@ -0,0 +1,26 @@ +*********** +Programming +*********** + +* Feel free to use your laptop +* You are strongly encourage to work with others + + * When you get stuck, ask those sitting around you for help + * Get used to working together in the labs + * Peer teaching and peer learning has been empirically shown to be very effective + + +For these questions, feel free to use a single Digital workspace for all the circuits. However, label each circuit with +labelled rectangles. These are components that can be found under **Components -> Misc. -> Decoration -> Rectangle**. + +Where possible, each question should have complete tests. The test component can be found under +**Components -> Misc. -> Test case**. Once a test component is placed on the workspace, right click on the component to +edit the test data. + +Questions may have restrictions on the logic gates that may be used. When restrictions are stated, they only apply to +the gates; inputs, outputs, wires, etc. may be still be used. + + + +Counting up and Down +==================== From 57e984fc29f17447eeab920d0efc36644e3db6a7 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Mon, 24 Mar 2025 12:44:22 -0300 Subject: [PATCH 2/4] clean intro --- site/labs/programming/programming.rst | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/site/labs/programming/programming.rst b/site/labs/programming/programming.rst index 27ef25c7..7220d036 100644 --- a/site/labs/programming/programming.rst +++ b/site/labs/programming/programming.rst @@ -10,17 +10,11 @@ Programming * Peer teaching and peer learning has been empirically shown to be very effective -For these questions, feel free to use a single Digital workspace for all the circuits. However, label each circuit with -labelled rectangles. These are components that can be found under **Components -> Misc. -> Decoration -> Rectangle**. -Where possible, each question should have complete tests. The test component can be found under -**Components -> Misc. -> Test case**. Once a test component is placed on the workspace, right click on the component to -edit the test data. - -Questions may have restrictions on the logic gates that may be used. When restrictions are stated, they only apply to -the gates; inputs, outputs, wires, etc. may be still be used. +Counting up and Down +==================== Counting up and Down -==================== +==================== \ No newline at end of file From 110a59be481a418314a73ba656572409aa597a74 Mon Sep 17 00:00:00 2001 From: James Hughes Date: Mon, 24 Mar 2025 12:56:43 -0300 Subject: [PATCH 3/4] create programming lab --- site/labs/programming/programming.rst | 34 +++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/site/labs/programming/programming.rst b/site/labs/programming/programming.rst index 7220d036..13ca66a3 100644 --- a/site/labs/programming/programming.rst +++ b/site/labs/programming/programming.rst @@ -10,11 +10,41 @@ Programming * Peer teaching and peer learning has been empirically shown to be very effective +For these questions, use the ESAP design with conditional jumps +:download:`from here. <../../topics/conditions/esap_alu_ram_output_pc_instruction_control_flag.dig>` + +Further, use the assembler +:download:`from here. <../../topics/programming/assembler.py>` + + Counting up and Down ==================== +#. Write an assembly program to count from 0 to 255, then from 255 to 0, on repeat + * :math:`0, 1, 2, ..., 253, 254, 255, 254, 253, ..., 2, 1, 0, 1, 2, ...` + * Be sure to write the program in assembly, then assemble it with the assembler + * Run the program on the system to ensure correctness -Counting up and Down -==================== \ No newline at end of file + + +Multiplication +============== + +#. Write a program to perform multiplication + + * To simplify the problem, assume the value will be multiplied by at least 1 + + * For example, :math:`15 \times x`, where :math:`x \ge 1` + + + * Be sure to write the program in assembly, then assemble it with the assembler + * Run the program on the system to ensure correctness + + + +Other Programs +============== + +#. Try to create various interesting programs for the ESAP system From f4d3cc28391e512e10c34a2b67d9e61fd669c971 Mon Sep 17 00:00:00 2001 From: James Alexander Hughes Date: Mon, 24 Mar 2025 13:07:03 -0300 Subject: [PATCH 4/4] u -> U --- site/labs/programming/programming.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/labs/programming/programming.rst b/site/labs/programming/programming.rst index 13ca66a3..2f11e679 100644 --- a/site/labs/programming/programming.rst +++ b/site/labs/programming/programming.rst @@ -18,7 +18,7 @@ Further, use the assembler -Counting up and Down +Counting Up and Down ==================== #. Write an assembly program to count from 0 to 255, then from 255 to 0, on repeat