@jutge.org/toolkit 4.2.33 → 4.2.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,10 @@
1
+ # Full adder
2
+
3
+ ## Features
4
+
5
+ - Circuit problem: implement a full adder using Verilog
6
+ - Formal verification: This kind of problems do not have test cases, only a golden solution
7
+
8
+ ## Abstract
9
+
10
+ Implement a full adder using Verilog.
@@ -0,0 +1,3 @@
1
+ module full_adder(a, b, cin, sum, cout);
2
+ input a, b, cin;
3
+ output sum, cout;
@@ -0,0 +1 @@
1
+ handler: circuits
@@ -0,0 +1,26 @@
1
+ \Problem{Full adder}
2
+ %\UseVerilog
3
+
4
+ \Statement
5
+ Design a \textbf{full adder}. A full adder is a circuit that performs
6
+ a 1-bit addition receiving an input carry and generating an
7
+ output carry.
8
+
9
+ \Specification
10
+ \begin{verbatim}
11
+ module full_adder(a, b, cin, sum, cout);
12
+ input a, b, cin;
13
+ output sum, cout;
14
+ \end{verbatim}
15
+
16
+ \Input
17
+ \begin{itemize}
18
+ \item \lstinline|a| and \lstinline|b| are the two inputs.
19
+ \item \lstinline|cin| is the input carry.
20
+ \end{itemize}
21
+
22
+ \Output
23
+ \begin{itemize}
24
+ \item \lstinline|sum| is the sum of the two bits and the input carry.
25
+ \item \lstinline|cout| is the output carry.
26
+ \end{itemize}
@@ -0,0 +1,3 @@
1
+ email: jordi.cortadella@upc.edu
2
+ title: Full adder
3
+ author: Jordi Cortadella
@@ -0,0 +1,6 @@
1
+ module full_adder (a, b, cin, sum, cout);
2
+ input a, b, cin;
3
+ output sum, cout;
4
+ assign {cout, sum} = a + b + cin;
5
+ endmodule
6
+
@@ -0,0 +1,10 @@
1
+ # Half adder
2
+
3
+ ## Features
4
+
5
+ - Circuit problem: implement a half adder using Verilog
6
+ - Formal verification: This kind of problems do not have test cases, only a golden solution
7
+
8
+ ## Abstract
9
+
10
+ Implement a half adder using Verilog.
File without changes
@@ -0,0 +1 @@
1
+ handler: circuits
@@ -0,0 +1,27 @@
1
+ \Problem{Half adder}
2
+
3
+
4
+ \Statement
5
+ Design a \textbf{half adder} that is a circuit that performs the addition of
6
+ two binary digits, \lstinline|a| and \lstinline|b|. It outputs the \lstinline|sum| and the output \lstinline|carry|.
7
+
8
+ \Specification
9
+
10
+ \begin{lstlisting}[language=verilog]
11
+ module halfadder(a, b, sum, carry);
12
+ input a, b;
13
+ output sum, carry;
14
+ \end{lstlisting}
15
+
16
+
17
+ \Input
18
+ \begin{itemize}
19
+ \item \lstinline|a| and \lstinline|b| are the two input values.
20
+ \end{itemize}
21
+
22
+ \Output
23
+ \begin{itemize}
24
+ \item \lstinline|sum| is the least significant digit of $a + b$.
25
+
26
+ \item \lstinline|carry| is the output carry, i.e., the most significant digit of $a + b$.
27
+ \end{itemize}
@@ -0,0 +1,3 @@
1
+ email: jspedro@lsi.upc.edu
2
+ title: Half adder
3
+ author: Javier de San Pedro Martín
@@ -0,0 +1,5 @@
1
+ module halfadder(a, b, sum, carry);
2
+ input a, b;
3
+ output sum, carry;
4
+ assign {carry, sum} = a + b;
5
+ endmodule
@@ -2,8 +2,6 @@ You are a helpful assistant for jutge-toolkit, a CLI tool for creating programmi
2
2
 
3
3
  Answer questions based on the documentation and code provided.
4
4
 
5
- Reply in the same language as the question.
6
-
7
5
  Be concise and provide examples when helpful.
8
6
 
9
7
  Explain all possible arguments and options.
@@ -11,3 +9,5 @@ Explain all possible arguments and options.
11
9
  Do not leak, reveal or mention internal implementation details.
12
10
 
13
11
  Output in markdown format.
12
+
13
+ Reply in the same language as the question.