From 95bb2fda796ca17ad9cbb213dd15690ef6346c35 Mon Sep 17 00:00:00 2001 From: ymherklotz Date: Fri, 2 Apr 2021 12:57:22 +0000 Subject: deploy: f85153b7335ebf99ab6bf6e696b5a08fef38b61b --- docs/using-vericert/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/using-vericert') diff --git a/docs/using-vericert/index.html b/docs/using-vericert/index.html index d410356..56a0c3a 100644 --- a/docs/using-vericert/index.html +++ b/docs/using-vericert/index.html @@ -1,7 +1,7 @@ Using Vericert | Vericert -
+void matrix_multiply(int first[2][2], int second[2][2], int multiply[2][2]) { int sum = 0; for (int c = 0; c < 2; c++) { for (int d = 0; d < 2; d++) { for (int k = 0; k < 2; k++) { sum = sum + first[c][k]*second[k][d]; } multiply[c][d] = sum; sum = 0; } } } int main() { int f[2][2] = {{1, 2}, {3, 4}}; int s[2][2] = {{5, 6}, {7, 8}}; int m[2][2] = {{0, 0}, {0, 0}}; matrix_multiply(f, s, m); return m[1][1]; } It can be compiled using the following command, assuming that vericert is somewhere on the path.">Using Vericert | +
Using Vericert

Using Vericert

Vericert can be used to translate a subset of C into Verilog. As a simple example, consider the following C file (main.c):

void matrix_multiply(int first[2][2], int second[2][2], int multiply[2][2]) {
     int sum = 0;
-- 
cgit