Skip to content

Instantly share code, notes, and snippets.

View Daichou's full-sized avatar
🦦

Dai chou (TAI, HUNG-CHOU) Daichou

🦦
View GitHub Profile
@Daichou
Daichou / my_dma_v1_0_tb.sv
Created March 22, 2020 06:11
Sample code for Xilinx AXI Verification IP as Slave/Master mode.
`timescale 1ns / 1ps
`include "my_dma_v1_0_tb_include.svh"
import axi_vip_pkg::*;
import my_dma_v1_0_bfm_1_slave_0_0_pkg::*;
import my_dma_v1_0_bfm_1_master_0_0_pkg::*;
module my_dma_v1_0_tb();
@Daichou
Daichou / sample.v
Last active June 13, 2018 13:29
verilog 問題
(* mark_debug = "true" *) wire [31:0] group_data_in[0:31];
(* mark_debug = "true" *) wire [31:0] group_data_out[0:31];
(* mark_debug = "true" *) wire [C_TRANSACTIONS_NUM-1:0] group_sram_addr;
(* mark_debug = "true" *) wire group_sram_we[0:31],group_sram_en;
(* mark_debug = "true" *) wire [31:0] face_data_in[0:31];
(* mark_debug = "true" *) wire [31:0] face_data_out[0:31];
(* mark_debug = "true" *) wire [2:0] face_sram_addr;
(* mark_debug = "true" *) wire face_sram_we[0:31],face_sram_en;
(* mark_debug = "true" *) reg [18:0] sum_result;
(* mark_debug = "true" *) reg [18:0] final_result;
#0 0x00007fffdecbab1d in cudart::configData::addArgument(void const*, unsigned long, unsigned long) ()
from /usr/local/lib/libpcl_gpu_features.so.1
#1 0x00007fffdeca84d7 in cudart::cudaApiSetupArgument(void const*, unsigned long, unsigned long) () from /usr/local/lib/libpcl_gpu_features.so.1
#2 0x00007fffdecdb575 in cudaSetupArgument () from /usr/local/lib/libpcl_gpu_features.so.1
#3 0x00007fffdec79f5d in __device_stub__ZN6thrust8cuda_cub4core13_kernel_agentINS0_8__unique9InitAgentINS0_3cub13ScanTileStateIiLb1EEEPiiEES7_mS8_EEvT0_T1_T2_ (__par0=..., __par1=185192, __par2=0x7fff8a27a400) at /tmp/tmpxft_00005526_00000000-5_uniq_inds.compute_70.cudafe1.stub.c:71
#4 0x00007fffdec7a000 in thrust::cuda_cub::core::__wrapper__device_stub__kernel_agent<thrust::cuda_cub::__unique::InitAgent<thrust::cuda_cub::cub::ScanTileState<int, true>, int*, int>, thrust::cuda_cub::cub::ScanTileState<int, true>, unsigned long, int*> (__cuda_0=...,
__cuda_1=@0x7fffffffd818: 185192, __cuda_2=@0x7fffffffd808: 0x7fff8a27a40
//extern int __io_putchar(int ch) __attribute__((weak));
extern int __io_getchar(void) __attribute__((weak));
register char * stack_ptr asm("sp");
char *__env[1] = { 0 };
char **environ = __env;
int __io_putchar(int ch)
{
/* Place your implementation of fputc here */
@Daichou
Daichou / BSP_LCD_Sample_main.c
Last active September 7, 2017 09:17
part of main.c in BSP LCD use STM32F469I_Discovey
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration----------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
IFS0bits.MI2CIF = 0;
IEC0bits.MI2CIE = 0;
/*Master Start*/
StartI2C();
/* Wait util Start sequence is completed */
while(I2CCONbits.SEN);
/* Clear interrupt flag */
IFS0bits.MI2CIF = 0;
/*Master send AD+W*/
Master |S |Device Addr+W| |Reg Addr| |DATA| |P|
Slave | | |ACK| |ACK| |ACK | |
Master |S |Device Addr+W| |Reg Addr| |S |Device Addr+R| | |NACK|P|
Slave | | |ACK| |ACK| | |ACK|DATA| | |
IFS0bits.MI2CIF = 0;
IEC0bits.MI2CIE = 0;
/*master Start*/
StartI2C();
/* Clear interrupt flag */
/* Wait till Start sequence is completed */
while(I2CCONbits.SEN);
/*master send AD+W*/
Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'vendor/bundle/ruby/2.3.0/gems/jekyll-3.2.1/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter.