The present invention relates generally to a vehicle vision system for a vehicle and, more particularly, to a vehicle vision system that utilizes one or more cameras at a vehicle.
Use of imaging sensors in vehicle imaging systems is common and known. Examples of such known systems are described in U.S. Pat. Nos. 5,949,331; 5,670,935 and/or 5,550,677, which are hereby incorporated herein by reference in their entireties.
A software system for a vehicle includes an electronic control unit (ECU) disposed at a vehicle equipped with the vehicular control system that includes electronic circuitry and associated software. The ECU also includes (i) a next stack activation size hardware register configured to store a stack size value and (ii) a hardware memory initializer configured to initialize memory. The ECU determines a maximum stack size of a vehicle control function called by a root function of software associated with the electronic circuitry of the ECU. The vehicle control function controls a system of the equipped vehicle. The next stack activation size hardware register stores a value equivalent to the determined maximum stack size of the vehicle control function and the ECU, prior to executing the vehicle control function, and while executing the root function, triggers execution of the hardware memory initializer. The hardware memory initializer, responsive to being triggered by the ECU, initializes memory based on the next stack activation size hardware register and in parallel with execution of the root function. The ECU executes the vehicle control function responsive to receiving an indication of completion from the hardware memory initializer indicating the memory initialization is complete.
These and other objects, advantages, purposes and features of the present invention will become apparent upon review of the following specification in conjunction with the drawings.
Modern vehicle system (such as a vision system and/or driver or driving assist system and/or object detection system and/or alert system) operate based on software executing on processing hardware. For example, as shown in
When coding and/or programming applications for safety related systems such as vehicular vision systems and driving assist systems and the like, deterministic behavior is generally an absolute requirement. This often drives a requirement of initialization of stack variables from static code analysis perspective. However, these initialized stack variables often cause the processor to execute additional instructions to initialize memory to a known (e.g., “zero out” the memory).
Implementations of the system involve defaulting or initializing the memory of the next stack frame to a fixed value. Thus, the stack activation frame (also known as a call stack or an execution stack or a control stack) at every run will execute deterministically with a fixed value and between runs, execution is not affected by stale values. Furthermore, stack overflows may be detected prior to calling the actual function. An automatic stack clearing system includes an additional hardware register definition (e.g., Reg_NextStackActivationSize) that maintains the value of a max stack activation frame size for a function that is callable from the current function. The system also includes dedicated memory clearing hardware (e.g., HW_MemClear) that is capable of clearing memory in parallel with the processor. The HW_MemClear accepts Reg_NextStackActivationSize and a stack pointer. The system also includes two additional instructions that allow functions to manipulate HW_MemClear and provides a status of HW_MemClear.
Referring now to
Referring now to
Referring now to
Just prior to the root function calling function F1, the root function executes a stack overflow check. Thus, the system always clears the required memory deterministically. Often in software code, not all variables in stack are written. When stack corruption occurs, this results in non-deterministic stack corruption which is often extremely difficult to debug or analyze. In contrast, the automatic stack clearing system described herein deterministically clears the stack to always guarantee that a stack overflow does not occur and improve performance and debugging capabilities.
Thus, the automatic stack clearing system provides a deterministic and reliable means of implementing the stack function in vehicular safety systems. For example, a vehicular vision system, such as a vision-based vehicular objection detection system implements software that executes on electronic circuitry of a control. The electronic circuitry includes a processor and memory. A root function of the object detection system software may, prior to calling functions related to the object detection system (e.g., a function that retrieves image data captured by a camera), establish a program stack as described herein for the called function to avoid stack overflow.
Changes and modifications in the specifically described embodiments can be carried out without departing from the principles of the invention, which is intended to be limited only by the scope of the appended claims, as interpreted according to the principles of patent law including the doctrine of equivalents.
The present application claims the filing benefits of U.S. provisional application Ser. No. 62/705,625, filed Jul. 8, 2020, which is hereby incorporated herein by reference in its entirety.
Number | Name | Date | Kind |
---|---|---|---|
5550677 | Schofield et al. | Aug 1996 | A |
5670935 | Schofield et al. | Sep 1997 | A |
5760962 | Schofield et al. | Jun 1998 | A |
5796094 | Schofield et al. | Aug 1998 | A |
5877897 | Schofield et al. | Mar 1999 | A |
5949331 | Schofield et al. | Sep 1999 | A |
6097023 | Schofield et al. | Aug 2000 | A |
6201642 | Bos | Mar 2001 | B1 |
6222447 | Schofield et al. | Apr 2001 | B1 |
6302545 | Schofield et al. | Oct 2001 | B1 |
6313454 | Bos et al. | Nov 2001 | B1 |
6320176 | Schofield et al. | Nov 2001 | B1 |
6353392 | Schofield et al. | Mar 2002 | B1 |
6396397 | Bos et al. | May 2002 | B1 |
6498620 | Schofield et al. | Dec 2002 | B2 |
6523964 | Schofield et al. | Feb 2003 | B2 |
6559435 | Schofield et al. | May 2003 | B2 |
6611202 | Schofield et al. | Aug 2003 | B2 |
6690268 | Schofield et al. | Feb 2004 | B2 |
6717610 | Bos et al. | Apr 2004 | B1 |
6757109 | Bos | Jun 2004 | B2 |
6802617 | Schofield et al. | Oct 2004 | B2 |
6806452 | Bos et al. | Oct 2004 | B2 |
6822563 | Bos et al. | Nov 2004 | B2 |
6831261 | Schofield et al. | Dec 2004 | B2 |
6891563 | Schofield et al. | May 2005 | B2 |
6946978 | Schofield | Sep 2005 | B2 |
7004606 | Schofield | Feb 2006 | B2 |
7038577 | Pawlicki et al. | May 2006 | B2 |
7339149 | Schofield et al. | Mar 2008 | B1 |
7480149 | DeWard et al. | Jan 2009 | B2 |
7526103 | Schofield et al. | Apr 2009 | B2 |
7720580 | Higgins-Luthman | May 2010 | B2 |
7855755 | Weller et al. | Dec 2010 | B2 |
7859565 | Schofield et al. | Dec 2010 | B2 |
9203100 | Kells | Dec 2015 | B2 |
11610129 | Bai | Mar 2023 | B2 |
20100261079 | Kells | Oct 2010 | A1 |
20210326663 | Winston | Oct 2021 | A1 |
20210383234 | Bai | Dec 2021 | A1 |
Number | Date | Country | |
---|---|---|---|
20220009507 A1 | Jan 2022 | US |
Number | Date | Country | |
---|---|---|---|
62705625 | Jul 2020 | US |