上一页 1 ··· 3 4 5 6 7
摘要: static int my_ioctl(struct file *filp, unsigned int reg_num, unsigned long arg){if(reg_num>=0&&reg_num<=8){iowrite32(arg,aes_slave_reg0_addr+reg_num*4);prink("write0x% xto0x% x!\n",arg,aes_slave_reg0_addr+reg_num*4);}else prink("wrong reg num");return 0;}static ssiz 阅读全文
posted @ 2013-04-09 14:46 puckpuck 阅读(186) 评论(0) 推荐(0) 编辑
摘要: static ssize_t myread(struct file*file,char *data,size_t count,loff_t *offp){ if(filp->f_flags &O_NONBLOCK) return -EAGAIN; int tmp[4]; tmp[0] =ioread32(aes_slave_reg5_addr) ;//AXI_AES_IP_mReadSlaveReg5(X_BASE,0); tmp[1] =ioread32(aes_slave_reg6_addr) ;//AAXI_AES_... 阅读全文
posted @ 2013-04-09 10:59 puckpuck 阅读(467) 评论(0) 推荐(0) 编辑
摘要: file_operations结构体中,会看到许多函数指针所指向的函数都必须传进structfile结构体指针structfile*作为参数。structfile结构体定义在<linux/fs.h>中,完整如下:引用structfile{union{structlist_headfu_list;structrcu_headfu_rcuhead;}f_u;structpathf_path;#definef_dentryf_path.dentry#definef_vfsmntf_path.mntconststructfile_operations*f_op;spinlock_tf_lo 阅读全文
posted @ 2013-04-09 10:28 puckpuck 阅读(437) 评论(0) 推荐(0) 编辑
摘要: first let's look at the struct file_operation{.ioctl = fun_name,(if in linux-digilent ti is .unlocked_ioctl = fun_name)} function declare:static int my_ioctl(unsigned int reg_num,unsigned int cmd,struct data *arg);now we know, there is a struct named datastruct data{int reg_num;int reg_val;};the 阅读全文
posted @ 2013-04-08 22:48 puckpuck 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 这个有两种情况。常见的1,删除vmlinux的最后两行,2,如果上面的不行就只能说 编译器和内核版本不搭配 按照我上个日志写的搞吧,没有问题的 阅读全文
posted @ 2013-04-06 21:42 puckpuck 阅读(1447) 评论(0) 推荐(0) 编辑
摘要: 1,交叉编译环境的建立现在网址上已经下载不到单独的编译链,可以在xilinx ISE14,4的第一个文件夹中找到 codesourcery 文件夹,打开找到 xlinx-2012.03-79-arm-xilinx-linux-gnueabi.bin右击属性-权限 勾上 以程序执行文件 ,把 。bin文件 拖入终端 -回车 开始安装或使用 chmod+x 更改权限2,更改环境变量export PATH=/《安装路径》/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/:$PATHexport ARCH=armexport 阅读全文
posted @ 2013-04-06 21:37 puckpuck 阅读(1388) 评论(0) 推荐(0) 编辑
摘要: 想xp远程登陆ubuntu12.04安装ssh : sudo apt-get install openssh-server时显示E: 无法解析或打开软件包的列表或是状态文件。网上找了找这个可以解决问题~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~正在读取软件包列表... 有错误!E: Encountered a section with no Package: headerE: Problem with MergeList /var/lib/apt/lists/cn.archive.ubuntu.com_ubuntu_dists_natty_main... 阅读全文
posted @ 2013-03-19 22:59 puckpuck 阅读(699) 评论(0) 推荐(0) 编辑
摘要: // 大结构就两个entity my_axi_ip is ,architecture IMP of my_axi_ip is////architecture IMP of my_axi_ip is 里面有两个元件调用一个是 自定义ip,另一个是axi_lite_ipif_v1_01_a.axi_lite_ipif;调用这两个元件,然后在结构中把这两个连起来,看上去像是 xilinx 提供了一个很全面的ip框架,然后你自己把你定义的ip的对应端口跟框架端口连接起来这个样子,添加的对外输出的端口则要在 声明实体,声明元件,元件例化的时候手动添加进去。刚接触xilinx和VHDL,这是个自我... 阅读全文
posted @ 2013-03-19 11:41 puckpuck 阅读(791) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7