墨衍会员
·
AI 创作全网分发
墨衍智能分发
本文由作者通过墨衍一键同步至各平台
1分发平台
800+累计阅读
898平均单平台
已同步平台
优快云
微信公众号
微博
知乎
掘金
百家号
博客园
抖音
小红书
你的文章也可以这样分发
墨衍会员 ¥399起/年,写一次发全网
我也要 →
码龄15年
VxWorks多任务通信--管道
vxworks多任务通信--管道
VxWorks内核解读-5
本篇博文,我们该谈到Wind内核的内存管理模块了,嵌入式操作系统中, 内存的管理及分配占据着极为重要的位置, 因为在嵌入式系统中, 存储容量极为有限, 而且还受到体积、成本的限制, 更重要的是其对系统的性能、可靠性的要求极高, 所以深入剖析嵌入式操作系统的内存管理, 对其进行优化及有效管理, 具有十分重要的意义。在嵌入式系统开发中, 对内存的管理有很高的要求。概括地说, 它必须满足以下三点要求:
VxWorks实时操作系统应用程序开发实战
在当今信息技术高速发展的时代,实时操作系统(RTOS)的应用越来越广泛,尤其是在嵌入式系统领域。VxWorks作为RTOS市场中的佼佼者,由美国Wind River公司开发,被广泛应用于航空、航天、通信、消费电子等多个行业。本章将带您揭开VxWorks的神秘面纱,了解其核心特性和优势。VxWorks构建系统是实时操作系统(RTOS)VxWorks的核心组件之一,负责软件项目的编译、链接、加载和部署。构建系统的基本概念是指从源代码到可执行文件的整个转换过程。
vxWorks中的常识!!!
vxWorks中的常识!!! LOCALstatic STATUSint IMPORTextern FASTregister 这几个比较常见 FUNCPTR就是指向程序的指针 那句话的意思就是弄一个指针变量,值就是函数printit的地址 其实你直接 timex((FUNCPTR)printit,0,0,0,0,0,0,0,0); 也应该是对的。就是传递了下函数的地址而已
Sublime Text4代码配色自定义方案
关于Sublime Text对于我的使用体验,只能说内置的代码主题真的都太low了,一点都不好看。所以接下来我分享一下我自定义代码配色。当然,大家也可以通过我给的中文翻译注释来自定义自己喜欢的颜色。废话不多说,直接上代码直接将代码复制粘贴到:Preferences > Customize Color Scheme 即可。},"globals":"foreground": "var(white)", // 前景色。
STM32 HAL 模拟I2C从机实战:软件实现与多设备通信优化
本文详细介绍了STM32 HAL库下软件模拟I2C从机的实现方法,包括GPIO开漏配置、基础信号实现、数据收发函数编写和多设备通信优化策略。通过灵活的软件模拟方案,解决了硬件I2C接口数量限制和稳定性问题,为多传感器数据采集等应用提供了可靠的通信保障。
vxworks 驱动框架
底层驱动对其驱动的设备都有一个自定义数据结构 xxDev。
国产数据库PolarDB-X实战:5分钟快速搭建本地开发环境(附Docker一键部署脚本)
本文提供了一份详尽的国产分布式数据库PolarDB-X本地开发环境搭建指南。通过Docker Compose一键部署脚本,开发者可在5分钟内快速启动一个功能完整的PolarDB-X实例,涵盖环境准备、脚本解析、连接验证及日常维护,极大简化了国产数据库的入门和体验流程。
vxworks的启动任务taskSpawn
vxworks启动线程任务的api接口和linux有所不同,vxworks采用的是taskSpawn。 如下代码所示: #include #include #include #include #include #include #include LOCAL int tidThis; LOCAL int tidThat; #define STACK_SIZE 1000
微磁模拟实战指南:从OOMMF安装到首个3D模型运行
本文详细介绍了OOMMF微磁模拟软件的安装与使用,从环境配置到首个3D模型运行的完整教程。涵盖Windows、Linux和macOS平台的安装避坑指南,以及MIF文件编写、并行计算优化等实战技巧,帮助研究人员快速掌握这一开源工具在磁畴壁运动、磁滞回线等微磁学问题中的应用。
面经-2023-禾赛-FPGA工程师
面经-2023-禾赛-FPGA工程师
vxworks下延时办法总结
vxworks下延时办法总结 最近,所作的工程需要1ms的定时器,俺参考了精华区的有关文 章并在各位大侠的帮助下,俺终于研究了1ms的精确定时,睍在看 到还有网友在求帮忙有关疑问,俺这儿就总结一下,期望对所有人有所 帮助。 1、taskDelay() taskdelay()是最简单的延时办法,他的单位是tick。它的函数 比如调用tas
20、自定义用户窗体:从创建到使用
本文详细介绍了在Excel VBA中创建和使用自定义用户窗体的完整过程,涵盖从窗体设计、控件添加与属性设置,到事件处理程序编写及宏调用的各个环节。通过实际示例讲解了如何实现文本大小写转换和员工信息录入等功能,并深入解析了常用控件的属性与事件机制。同时提供了控件命名规范、快捷键使用、布局技巧等实用建议,帮助读者构建高效、交互性强的VBA用户界面。
taskspawn函数 linux,vxworks的启动任务taskSpawn
vxworks启动线程任务的api接口和linux有所不同,vxworks采用的是taskSpawn。如下代码所示:#include #include #include #include #include #include #include LOCAL int tidThis;LOCAL int tidThat;#define STACK_SIZE 1000void* thisRoutine(vo...
CollisionLoss 设计与实现原理说明
文章摘要 CollisionLoss是一种用于自动驾驶轨迹规划的碰撞惩罚损失函数,其核心思想是用多个沿车身纵轴排列的圆盘来近似表示车辆(Oriented Bounding Box)。该设计通过圆盘间的距离计算实现碰撞检测,具有以下特点: 可微性:圆盘距离计算处处可微,便于梯度回传,而传统矩形碰撞检测(分离轴定理)不可微且计算复杂。 多圆盘设计:沿车身纵向排列多个圆盘能更精确地拟合细长车体,避免单圆盘过度膨胀导致的误报。 安全覆盖:圆盘半径经过数学推导,确保完全覆盖车体矩形,避免漏检(宁可保守)。 软惩罚机制
Agent应用实践之二十九 - 设计模式:人机协同
本章讲解了一种比较常见的设计模式:人机协同。通过一些场景举例,同时使用AgentScope本身自带的能力实现的人机协同模式,最后通过源码分析了AgentScope中如何实现。通过了解人机协同模式对于实际工程使用也是非常有用的。
vxWorks互斥信号量示例
#include "vxWorks.h" #include "semLib.h" #include "taskLib.h" #include "logLib.h" #include "sysLib.h" #include "stdio.h" #define CONSUMER_TASK_PRI 98 /* Priority of the consumerTask task
霍尼韦尔SoftMaster使用说明
霍尼韦尔SoftMaster使用说明
vxWorks的二值信号量示例
#include "vxWorks.h" #include "taskLib.h" #include "semLib.h" #include "stdio.h" #include "sysLib.h" SEM_ID semId; LOCAL SEM_ID semId1; /* semaphore id of binary semaphore 1 */ LOCAL SE
Devexpress16.2.6破解工具
Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具
IEM模型,地表粗糙度模拟
利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟
vxworks信号量之疑
今天在运行一个信号量的程序时,感觉结果挺奇怪的,程序如下: /* include files */ #include "vxWorks.h" #include "wdLib.h" #include "stdio.h" #include "semLib.h" #include "taskLib.h" #include "usrLib.h" #include "sysLib.h"...
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
vxWorks7.0下基于vxBus的定时器子系统
最近研究了一下vxworks7.0下基于vxbus的定时器子系统,方便我们在需要使用定时器中断的时候引用,开发过程中的一点体会记录下来,如果由理解不对或者不全面的望批评指正,谢谢。 开发平台为zynq7Z020,该处理器由三个全局的定时器,分别是globaltimer,ttc_0,ttc_1,其中全局定时器用作系统的脉搏,是整个操作系统的ticks定时器,其可通过内核配置完成,具体如下: 而ttc_0会作为系统的AUX clock在初始化的时候完成匹配,系统使用SPY命令时启用定时器,所以,如果要使
基于VxWorks的内存模拟型的字符IO设备驱动程序,并实现任务间通信
要求:基于VxWorks的内存模拟型的字符IO设备驱动程序的设计,并编写应用程序实现任务间的通信,编写makefile文件。 内存模拟型的字符IO设备驱动程序memDrv.c 内存模拟型的字符IO设备驱动程序memDrv.c拟型的字符IO设备驱动程序memDrv.c:** /* memDrv.c - pseudo memory device driver */ #include "memDrv.h" /*memDrv - install a memory driver*/ STATUS memDrv (v
PowerPC VxWorks BSP分析7——image压缩
1 映像压缩 在嵌入式系统中,我们通常会要求VxWorks文件尽量小,比如通过串口、软盘或tffs加载VxWorks的时候,如果文件太大,可能无法存储,或加载失败。下面介绍一种利用Tornado和VxWorks自带的deflate和inflate,对VxWorks文件进行压缩和解压缩的技术。 1. 使用Tornado创建bootable的project,包括应用程序。对VxWorks进行适当的...
851
2969
95
1533
1464

被折叠的 条评论
为什么被折叠?



