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 <stdlib.h> | |
#include <string.h> | |
#include <stdbool.h> | |
#include <time.h> | |
/* | |
* memory management | |
* | |
* a b c d e |
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
# To display the perf.data header info, please use --header/--header-only options. | |
# | |
# Samples: 184K of event 'cycles' | |
# Event count (approx.): 114854412435 | |
# | |
# Overhead Command Shared Object Symbol | |
# ........ ............... ......................... .......................................... | |
# | |
9.96% kpktdevd_4 [kernel.kallsyms] [k] _raw_spin_lock | |
9.87% kpktdevd_1 [kernel.kallsyms] [k] _raw_spin_lock |
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
static const unsigned char pkt[] = { | |
// ethernet header | |
0xa0, 0x36, 0x9f, 0x18, 0x50, 0xe5, | |
0x00, 0x1c, 0x7e, 0x6a, 0xba, 0xd1, | |
0x08, 0x00, | |
// IPv4 header | |
0x45, 0x00, 0x00, 0x4e, | |
0x00, 0x00, 0x40, 0x00, | |
0x40, 0x11, 0xfb, 0x32, | |
0x0a, 0x00, 0x00, 0x6e, |
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 <linux/init.h> | |
#include <linux/kernel.h> | |
#include <linux/module.h> | |
#include <linux/moduleparam.h> | |
#include <linux/fs.h> | |
#include <linux/proc_fs.h> | |
#include <linux/miscdevice.h> | |
#include <linux/uaccess.h> | |
#include <linux/stat.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
`timescale 1ps / 1ps | |
`default_nettype none | |
module tb (); | |
task waitclock; | |
begin | |
@(posedge clk); | |
#1; | |
end |
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
FFFFFFFFFFFF 705681B5B36D 0800 45 00 00 BC A1 F8 00 00 40 11 80 8B CB B2 8B FE FF FF FF FF 44 5C 44 5C 00 A8 8A 62 7B 22 68 6F 73 74 5F 69 6E 74 22 3A 20 38 31 31 36 33 35 32 36 36 2C 20 22 76 65 72 73 69 6F 6E 22 3A 20 5B 31 2C 20 38 5D 2C 20 22 64 69 73 70 6C 61 79 6E 61 6D 65 22 3A 20 22 22 2C 20 22 70 6F 72 74 22 3A 20 31 37 35 30 30 2C 20 22 6E 61 6D 65 73 70 61 63 65 73 22 3A 20 5B 36 32 32 38 38 30 2C 20 32 38 30 30 32 31 36 30 34 2C 20 39 35 33 30 30 32 2C 20 31 30 37 36 34 34 36 37 2C 20 31 31 34 30 30 31 33 39 39 2C 20 39 38 30 35 31 34 36 2C 20 32 35 39 32 30 38 30 32 38 5D 7D | |
FFFFFFFFFFFF 705681B5B36D 0800 45 00 00 BC 4A C6 00 00 40 11 80 0A CB B2 8B FE CB B2 8B FF 44 5C 44 5C 00 A8 8A 62 7B 22 68 6F 73 74 5F 69 6E 74 22 3A 20 38 31 31 36 33 35 32 36 36 2C 20 22 76 65 72 73 69 6F 6E 22 3A 20 5B 31 2C 20 38 5D 2C 20 22 64 69 73 70 6C 61 79 6E 61 6D 65 22 3A 20 22 22 2C 20 22 70 6F 72 74 22 3A 20 31 37 35 30 30 2C 20 22 6E 61 6D 65 73 70 61 63 65 73 22 3A 20 5B 36 32 32 38 38 30 2C 20 32 38 30 30 32 |
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
#!/bin/bash | |
# | |
# usage: ./ping.sh </dev/ethpipe/0 | |
# | |
TEMP_DIR="/tmp/" | |
MY_PORT="0" | |
SRC_MAC_ADDR="000000000011" | |
DST_MAC_ADDR="A0369F1850E5" | |
SRC_IP_ADDR="0A 00 00 6E" |
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
pkt='1100000000000000 A0369F1850e5 001C7E6ABAD1 0800 45 00 00 4E 00 00 40 00 40 11 FB 32 0A 00 00 6E 0A 00 00 02 04 04 00 89 00 3A 38 03 10 FD 01 10 00 01 00 00 00 00 00 00 20 46 45 45 4E 45 42 46 45 46 44 46 46 46 4A 45 42 43 4E 45 49 46 41 43 41 43 41 43 41 43 41 43 41 00 00 20 00 01' | |
seq=0 | |
for i in {0..999}; do | |
echo $pkt > /dev/ethpipe/0 | |
echo -n "$seq " | |
cat /sys/kernel/ethpipe/local_time1 | |
seq=$(( $seq + 1 )) | |
sleep 1 | |
done |
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
default: atob | |
gcc -O -o atob atob.c | |
clean: | |
rm -f *.o atob |
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
//------------------------------------------------------------------ | |
// PHY cold reset (8.58 sec) | |
//------------------------------------------------------------------ | |
reg [29:0] coldsys_rst = 0; | |
wire coldsys_rst8sec = (coldsys_rst == 30'h3FFFFFFF); | |
always @(posedge clock) | |
coldsys_rst <= !coldsys_rst8sec ? coldsys_rst + 30'h1 : 30'h3FFFFFFF; | |
assign phy1_rst_n = coldsys_rst8sec; | |
assign phy2_rst_n = coldsys_rst8sec; |