hardware

Serial versus SPI

与世无争的帅哥 提交于 2019-12-05 15:04:41
问题 What is the difference between SPI and serial? In reading an article talking about inter-processor communications, it states that serial interfaces are being replaced with SPI for better/faster comms? What exactly is the difference? 回答1: The word "serial" doesn't mean much. But I'll assume that you are talking about traditional serial communication standards. What's fundamentally different about SPI is that it is synchronous . As opposed to, say, RS-232, an asynchronous signaling standard. An

PKCS#11. Possibility of performing Ecryption/Decryption in hardware

与世无争的帅哥 提交于 2019-12-05 12:43:56
Cheers. This is a copy of my question on crypto stack exchange. I'm dealing with HSM via PKCS#11 C/Python interface. I'm wondering is it possible to do some C_Encrypt / C_Decrypt in hardware. By saying "in hardware" I mean encryption/decryption without exposing the result to the caller space. This is mostly aboud decryption as I want to call C_Decrypt and leave the result inside the HSM as arbitrary data to do some other transformations on that data later, saying re-encrypting it on some other key. Thank you in advance. PKCS#11 does not provide such methods but certain HSM models allow you to

Do bitwise operations distribute over addition?

时间秒杀一切 提交于 2019-12-05 11:34:49
I'm looking at an algorithm I'm trying to optimize, and it's basically a lot of bit twiddling, followed by some additions in a tight feedback. If I could use carry-save addition for the adders, it would really help me speed things up, but I'm not sure if I can distribute the operations over the addition. Specifically if I represent: a = sa+ca (state + carry) b = sb+cb can I represent (a >>> r) in terms of s and c? How about a | b and a & b? Think about it... sa = 1 ca = 1 sb = 1 cb = 1 a = sa + ca = 2 b = sb + cb = 2 (a | b) = 2 (a & b) = 2 (sa | sb) + (ca | cb) = (1 | 1) + (1 | 1) = 1 + 1 = 2

Best Visual Studio Hardware Upgrade [closed]

孤人 提交于 2019-12-05 11:02:05
I have a reasonably modern developer desktop (E6600, ASUS PN5-E, 2GB RAM, 350GB SATA2, Vista Ultimate x32), but I'd like to squeeze some more out of it. I am wondering what the best bang-for-bucks hardware upgrade would be. If I limit my budget to £150GBP (~$300USD), what would people say would give me the best performance increase when developing? (Note that I have MSDN so can go for x64 if that's going to give me anything.) I've been reading Jeff Atwood's Ultimate Developer Rig series and am thinking that adding a 10,000K RPM Raptor and booting off that would be the best (presumably I would

Can I determine / how, if a device has vibration or not?

狂风中的少年 提交于 2019-12-05 08:38:24
I have some settings that enable/disable vibration for certain actions, but I find it pointless to display them if the device doesn't have the ability to vibrate. Is there a way to check if the person is using an iPod touch and if it has vibration? This code should do it - be aware it 'assumes' the iPhone is the only device with Vibration capability. Which it is for the moment... - (NSString *)machine { static NSString *machine = nil; // we keep name around (its like 10 bytes....) forever to stop lots of little mallocs; if(machine == nil) { char * name = nil; size_t size; // Set 'oldp'

detecting the memory page size

白昼怎懂夜的黑 提交于 2019-12-05 05:08:18
Is there a portable way to detect (programmatically) the memory page size using C or C++ code ? Since Boost is a pretty portable library you could use mapped_region::get_page_size() function to retrieve the memory page size. As for C++ Standard it gives no such a possibility. C doesn't know anything about memory pages. On posix systems you can use long pagesize = sysconf(_SC_PAGE_SIZE); Yes, this is platform-specific. On Linux there's sysconf(_SC_PAGESIZE) , which also seems to be POSIX. A typical C library implements this using the auxiliary vector. If for some reason you don't have a C

What algorithms do FPUs use to compute transcendental functions?

半腔热情 提交于 2019-12-05 04:19:25
What methods would a modern FPU use to compute transcendental functions ? For example, Intel CPUs provide instructions such as FSIN , FCOS , FYL2X , etc. I am curious as to what algorithms would be used to actually implement these in hardware. My naïve guess would be Taylor series perhaps combined with some lookup tables, but that's nothing more than a wild guess. Please enlighten me. P.S. This question is more general than just Intel hardware. One place to start could be " New Algorithms for Improved Transcendental Functions on IA-64 " by Shane Story and Ping Tak Peter Tang, both from Intel.

Why is rising edge preferred over falling edge

别说谁变了你拦得住时间么 提交于 2019-12-05 01:16:33
Flip-Flops(,Registers ...) are usually triggered by a rising or falling edge. But mostly in code you see an if-clause which uses the rising edge triggering. In fact i never saw a code with falling edge. Why is that? Is it because naturally the programmers use rising edge, because they are used to, or is it because of some physical/analog law/fact, where the rising edge programming is faster/simpler/energy-efficient/... ? As zennehoy says, it's convention - but one going back to when logic was done in discrete chips with a few gates or flipflops within them. Those packages of flipflops were

Creating a virtual monitor (the display device)

杀马特。学长 韩版系。学妹 提交于 2019-12-05 00:11:43
问题 I raised a question here but realized I was going the wrong direction. I need to create a virtual monitor (really just the space in memory) that is large enough to fit a website, that would normally span several screens. Is this possible in any language? I tried Java, but failed miserably so far. I don't expect this to be easy, any pointers would appreciated. I'd imagine the OS and the video cart would have to told in somehow that there's a third monitor. 回答1: Use any Virtualization tool

Access Hardware Information from Web Browser

℡╲_俬逩灬. 提交于 2019-12-04 21:18:31
I am interested in creating a website that needs to know as much specific hardware (ie computer model, cpu model, RAM size, etc) as possible. Are you aware of any method to find out this information? I know about ActiveX controls, however I'd prefer to use a more flexible method. Javascript? Asp.NET? Flash? Java? Silverlight? Thank you! Zakaria Javascript : Impossible; .Net/Silverlight (If you develop a non-based web browser app) : http://www.c-sharpcorner.com/uploadfile/dpatra/system-information-from-registry-in-silverlight-4/ Java (vi a java applet): get OS-level system information .