This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from Vtest__ALL.cpp:6: | |
Vtest___024unit__DepSet_h9b08f7a8__0.cpp: In function 'std::string VL_TO_STRING(const Vtest_StructType__struct1&)': | |
Vtest___024unit__DepSet_h9b08f7a8__0.cpp:13:42: error: invalid user-defined conversion from 'const VlWide<8>' to 'int' [-fpermissive] | |
13 | out += "'{msg:" + VL_TO_STRING_W(obj.msg); | |
| ~~~~^~~ | |
In file included from /home/yodalee/local/share/verilator/include/verilated.h:930, | |
from Vtest.h:11, | |
from Vtest.cpp:4, | |
from Vtest__ALL.cpp:3: | |
/home/yodalee/local/share/verilator/include/verilated_types.h:217:5: note: candidate is: 'VlWide<T_Words>::operator WDataInP() const [with long unsigned int T_Words = 8; WDataInP = const unsigned int*]' (near match) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef struct { | |
logic [255:0] msg; | |
logic [255:0] key; | |
logic [255:0] modulus; | |
} StructType; | |
module TestMod ( | |
input logic clk, | |
StructType in | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(verilog) | |
find_package(verilator HINTS $ENV{VERILATOR_ROOT}) | |
set(OUT Vmain) | |
add_executable(${OUT} main.cpp) | |
verilate(${OUT} TRACE_FST SOURCES out.sv pkg.sv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module FLOLAC22 where | |
import Data.List | |
-- This exercise covers the first 6 and the 8th chapters of "Learn You a Haskell for Great Good!" | |
-- Chapter 1 - http://learnyouahaskell.com/introduction | |
-- Chapter 2 - http://learnyouahaskell.com/starting-out | |
-- Chapter 3 - http://learnyouahaskell.com/types-and-typeclasses | |
-- Chapter 4 - http://learnyouahaskell.com/syntax-in-functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
PAGES = 180 | |
DAYS = 14 | |
memo = {} | |
def search(page: int, days: int) -> int: | |
if (page, days) in memo: | |
return memo[(page, days)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::time::{SystemTime, UNIX_EPOCH}; | |
const SEED_MAX:u64 = 9999997; | |
struct RandomGen { | |
seed: u64 | |
} | |
impl RandomGen { | |
pub fn new(seed: u64) -> Self { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// file: fastfib.c | |
// compile with gcc -lgmp fastfib.c | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <gmp.h> | |
#include <ctype.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-fte="1" data-ftr="1" class="_5jmm _5pat _3lb4 g_yvbt0g4s4" id="hyperfeed_story_id_5bba1b28a1f901a21693682" data-testid="fbfeed_story" data-cursor="MTUzODkyMzMwMjoxNTM4OTIzMzAyOjM6LTkzNzU4OTg3MzMxMTUzNDQzNTowOjY2MDk2MjUyNTQ5NDU2MjkxMTY=" data-dedupekey="-937589873311534435" data-timestamp="1538644175" aria-posinset="3" aria-setsize="12" data-referrer="hyperfeed_story_id_5bba1b28a1f901a21693682" role="article" aria-labelledby="js_si" aria-describedby="js_sj js_sk" data-insertion-position="2"> | |
<div class="_4-u2 mbm _4mrt _5v3q _4-u8" id="u_jsonp_8_1"> | |
<div class="_3ccb" data-ft="{"tn":"-R"}" data-gt="{"type":"click2canvas","fbsource":703,"ref":"nf_generic"}" id="u_jsonp_8_2"> | |
<div></div> | |
<div></div> | |
<div class="_5pcr userContentWrapper" style="" data-ft="{"tn":"-R"}"> | |
<div class="_1dwg _1w_m _q7o"> | |
<div class="_4r_y" id="u_jsonp_8_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
void peak(vector<vector<int>> &table, int row, int col) { | |
for (int i = 0; i < row; ++i) { | |
for (int j = 0; j < col; ++j) { | |
cout << table[i][j] << " "; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <linux/kernel.h> | |
#include <sys/syscall.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/wait.h> | |
#include "dummysyscall.h" |
NewerOlder