Skip to content

Instantly share code, notes, and snippets.

View tanakamura's full-sized avatar

Takashi Nakamura tanakamura

View GitHub Profile
/*
clflush 4278.300100[MiB/s]
clflushopt 44717.389375[MiB/s]
memset 30407.684046[MiB/s]
*/
#include <stdio.h>
#include <x86intrin.h>
#include <sys/time.h>
#include <string.h>
module design_1_wrapper
();
wire [63:0] gpio_out0;
wire [63:0] gpio_in0;
assign gpio_in0[0] = gpio_out0[1];
PS7 PS7_i (
.EMIOGPIOO (gpio_out0),
set output_dir ./out
file mkdir $output_dir
read_verilog top.v
synth_design -top top -part xc7z020clg484-1 -flatten rebuilt
opt_design
place_design
phys_opt_design
module top(led_0,
sw_0);
(* IOSTANDARD="LVCMOS33"*) (* PACKAGE_PIN = "T22"*) output led_0;
(* IOSTANDARD="LVCMOS25"*) (* PACKAGE_PIN = "F22"*) input sw_0;
assign led_0 = sw_0;
endmodule
/*
==4KB==
memset L1/L2 1.8[usec], 2230.9[MB/s]
memset L2 1.9[usec], 2198.6[MB/s]
memset L1 5.9[usec], 696.6[MB/s]
memset wo cache 19.9[usec], 206.2[MB/s]
flush wb 10.1[usec], 406.2[MB/s]
flush4k wb 8.9[usec], 459.9[MB/s]
flush empty 4.1[usec], 990.8[MB/s]
flush4k empty 3.2[usec], 1270.1[MB/s]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
double
sec(void)
{
struct timespec ts;
#include <immintrin.h>
#include <stdio.h>
#include <intrin.h>
/*
lookup8:
subq $12, %rsp
.seh_stackalloc 12
.seh_endprologue
movl %edx, (%rsp)
matmul_x86_fma_:
.LFB1165:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
addq %rdi, %rcx
vxorps %xmm0, %xmm0, %xmm0
movq %rsp, %rbp
.cfi_def_cfa_register 6
#include <stdio.h>
int func(int v) {
printf("%d\n", v);
return 0;
}
void f1(unsigned char b, unsigned char c) {
auto a = b + c;
func(a);
#include <clang-c/Index.h>
#include <stdio.h>
#include <stdlib.h>
struct FindState {
bool find;
int target_line;
CXCursor loop;
};